PT-2026-165274
CVE-2026-141536
·
Publicado
2026-12-01
·
Atualizado
2026-12-02
Descrição por
CVSS 3.1
3.7
BaixaMétricasAV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N
Impact
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. #normalize already percent-encodes them, so code that calls uri.normalize.request uri would not be affected by this vulnerability, but uri.request uri alone would.Common clients don't pass the characters through.
Net::HTTP raises ArgumentError: A Request-Line must not contain CR or LF. The http gem 5.x percent-encodes them in its own URI normalizer before calling #request uri, and 6.x no longer calls #request uri. Vulnerable code would need to use some other client implementation that writes #request uri directly into the HTTP request line.Affected Versions
This vulnerability affects Addressable >= 2.1.2, the first version with
#request uri. It is fixed in 2.10.0, where #request uri percent-encodes control characters (U+0000 to U+001F and U+007F) and space, and leaves every other character as written. Notably, a client that constructed requests using #request uri would now send them with the characters percent-encoded, where previously it might have raised an exception. This is comparable to the current behavior of the http and faraday gems.Workarounds
- Reject URIs whose
request urimatches/[x00-x20x7F]/before sending. - Build requests with a client that validates the request line, such as
Net::HTTP.
Credits
Reported by Praneeth (@praneeth-bala), UCSB SecLab.
For more information
If there are any questions or comments about this advisory:
Explorabilidade
Exploit
Correção
Fornecedores
Produtos afetados
Encontrou algum problema na descrição? Tem algo a acrescentar? Fique à vontade para nos escrever 👾