GHSA-QG8X-QM93-FW27

Vulnerability from github – Published: 2026-12-01 23:55 – Updated: 2026-12-01 23:55
VLAI
Summary
Addressable URI#request_uri returns control characters unencoded with possible HTTP request splitting
Details

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_uri matches /[\x00-\x20\x7F]/ 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: * Open an issue

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 2.9.2"
      },
      "package": {
        "ecosystem": "RubyGems",
        "name": "addressable"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.1.2"
            },
            {
              "fixed": "2.10.0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2026-141536"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-113",
      "CWE-93"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2026-12-01T23:55:58Z",
    "nvd_published_at": null,
    "severity": "LOW"
  },
  "details": "### Impact\n\n`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.\n\n`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 \u00a73 doesn\u0027t allow CR, LF or space in a request target, and RFC 3986 doesn\u0027t 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.\n\nCommon clients don\u0027t 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.\n\n### Affected Versions\n\nThis vulnerability affects Addressable \u003e= 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.\n\n### Workarounds\n\n- Reject URIs whose `request_uri` matches `/[\\x00-\\x20\\x7F]/` before sending.\n- Build requests with a client that validates the request line, such as `Net::HTTP`.\n\n### Credits\n\nReported by Praneeth (@praneeth-bala), UCSB SecLab.\n\n### For more information\n\nIf there are any questions or comments about this advisory:\n* [Open an issue](https://github.com/sporkmonger/addressable/issues)",
  "id": "GHSA-qg8x-qm93-fw27",
  "modified": "2026-12-01T23:55:58Z",
  "published": "2026-12-01T23:55:58Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/sporkmonger/addressable/security/advisories/GHSA-qg8x-qm93-fw27"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sporkmonger/addressable/commit/1a46f03d6e33c19399e947b13ee5aab5c3a7c586"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/sporkmonger/addressable"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sporkmonger/addressable/releases/tag/addressable-2.10.0"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Addressable URI#request_uri returns control characters unencoded with possible HTTP request splitting"
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.