All vulnerabilities

RubyGems

CVE-2026-141536

Addressable URI#request_uri returns control characters unencoded with possible HTTP request splitting

Severity
Low 3.7
Published
1 Dec 2026
Last changed
2 Dec 2026
Added to UpHeron
2 Dec 2026
Fixed in
2.10.0
Weakness
HTTP response splitting (CWE-113)CRLF injection (CWE-93)
Attack
Over the network · Only under certain conditions · No login needed · No user action needed
Attacker can
Change some data
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Also known as
GHSA-qg8x-qm93-fw27
Sources
OSV.dev and GitHub

Description

Addressable::URI#request_uri returns the path and query as stored, including carriage returns, line feeds, other control characters and spaces. #request_uri was designed to be written into an HTTP request line, so a client that does that with a URI built from untrusted input could have the request line ended early and extra headers, or a second request, added after it. The HTTP protocol interprets text after the line break as headers, which can add or override headers such as Host or Authorization, or, with keep-alive, could potentially start a second request on the same connection. What that might achieve depends on the client and the server it talks to.

Addressable::URI.parse and the path= and query= setters accept control characters, and #request_uri joins the path and query without encoding them. RFC 9112 §3 doesn't allow CR, LF or space in a request target, and RFC 3986 doesn't allow them in a URI.

From the GitHub Advisory Database, CC BY 4.0. Shortened; the full text is there.

Workarounds

  • Reject URIs whose request_uri matches /[\x00-\x20\x7F]/ before sending.
  • Build requests with a client that validates the request line, such as Net::HTTP.
Workarounds as given by the GitHub Advisory Database, CC BY 4.0.

Affected software

SoftwareAffected versions
addressableRubyGems · osv:RubyGems:addressable
  • From 2.1.2 before 2.10.0

About addressable

Total downloads (RubyGems)
1,323,514,580RubyGems, 1 Dec 2026

References