CVE-2026-141538: Addressable Addressable URI Userinfo Setters Store Vulnerability

MODERATE
Advisory Identifier: GHSA-qrq6-rcpx-pmm6
CVSS 4.8
CWE-436 CWE-74
Published
Advisory Summary

CVE-2026-141538 is a MODERATE (CVSS 4.8) addressable uri userinfo setters store vulnerability (CWE-436: Interpretation Conflict) affecting Addressable libraries in the RubyGems ecosystem. The issue involves addressable uri userinfo setters store delimiters raw, so the serialized uri names a different host. Remediation is available by upgrading affected packages to version 2.10.0.

CVE-2026-141538 at a Glance

CVE Identifier CVE-2026-141538
GHSA Identifier GHSA-qrq6-rcpx-pmm6
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-436: Interpretation Conflict
Affected Product Addressable
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 4.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-141538

To remediate this vulnerability, upgrade all affected Addressable dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

addressable fixed: 2.10.0
Upgrade addressable to 2.10.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for addressable

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-141538, inspect your project dependencies for Addressable:

inspect dependencies for addressable

Analyze the terminal output to locate any version of Addressable in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-436: Interpretation Conflict, where product a handles inputs or steps differently than product b, which causes a to perform incorrect actions based on its perception of b's state. In Addressable, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact `Addressable::URI#user=`, `#password=`, `#userinfo=` and the matching `Addressable::URI.new` options store the value they are given without encoding or rejecting delimiters. A value containing `/`, `?` or `#` ends the userinfo early when the URI is serialized, so `#to_s` names a different host than `#host` and `#origin` report. The URI object keeps the component as assigned, and its own accessors agree with each other: `host` is the host the application set, and `origin` is built from it. `#to_s` joins the components with their delimiters but doesn't encode them, so `user = "alice@evil.example/"` serializes as `https://alice@evil.example/@api.example.com/…`. Addressable and Ruby's `URI` both read `evil.example` as the host of that string. A `[` or `]` in the userinfo makes the serialized URI fail to parse, a `:` in the user moves the rest of it into the password, and browsers read a `\` as a `/`, ending the userinfo there. `#normalize` encodes all of these correctly. An application that puts an untrusted value into the userinfo of a URI for a trusted host, checks `host` or `origin`, and then passes `to_s` to an HTTP client sends the request to a host the attacker chose. Headers or a body meant for the trusted service, such as an API token, go with it. The attacker needs the application to build URIs this way, so attack complexity is high. ### Affected Versions This vulnerability affects Addressable >= 2.0.0. In 2.9.2, `#userinfo=` ignores a value without a colon, so the injected text has to follow one, as in `u:x@evil.example/`. It is fixed in 2.10.0, where `#user=`, `#password=`, `#userinfo=`, `#authority=`, `URI.new` and `URI.parse` raise `InvalidURIError` for `/`, `?`, `#`, `[`, `]` or `\` in the user or password, or `:` in the user. An `@` is still accepted: the last `@` ends the userinfo, so it reads the same once serialized. ### Workarounds - Serialize with `uri.normalize.to_s`, which encodes the delimiters, instead of `uri.to_s`. - Encode userinfo values before assigning them, for example with `Addressable::URI.encode_component(value, Addressable::URI::CharacterClasses::UNRESERVED)`. - Check the host of the final string with `Addressable::URI.parse(uri.to_s).host`, not of the object. ### Credits Found by Bob Aman (@sporkmonger). ### For more information If there are any questions or comments about this advisory: * [Open an issue](https://github.com/sporkmonger/addressable/issues)

CVE-2026-141538 Affected Addressable Versions

1 component(s)
Fixed Versions:
2.10.0
Product / Package Ecosystem Affected Versions Fixed Version
addressable
RubyGems
≥ 2.0.0
< 2.10.0
2.10.0

References

Frequently Asked Questions

What is CVE-2026-141538?
CVE-2026-141538 is a security vulnerability in Addressable involving Addressable URI userinfo setters store delimiters raw, so the serialized URI names a different host under CWE-436: Interpretation Conflict.
Which Addressable versions are affected?
Affected versions include releases prior to 2.10.0 across affected packages: addressable.
What version fixes CVE-2026-141538?
Upgrading to 2.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is addressable affected?
Yes, addressable is affected in releases prior to 2.10.0. Upgrade your dependency to 2.10.0 or later.
What is the CVSS score of CVE-2026-141538?
CVE-2026-141538 has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-141538?
CVE-2026-141538 is classified under CWE-436: Interpretation Conflict (Product A handles inputs or steps differently than Product B, which causes A to perform incorrect actions based on its perception of B's state.).
How can I check RubyGems dependencies for CVE-2026-141538?
Run the dependency tree command: 'inspect dependencies for addressable'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-qrq6-rcpx-pmm6",
  "modified" : "2026-12-01T23:52:47Z",
  "published" : "2026-12-01T23:52:47Z",
  "aliases" : [ "CVE-2026-141538" ],
  "summary" : "Addressable URI userinfo setters store delimiters raw, so the serialized URI names a different host",
  "details" : "### Impact\n\n`Addressable::URI#user=`, `#password=`, `#userinfo=` and the matching `Addressable::URI.new` options store the value they are given without encoding or rejecting delimiters. A value containing `/`, `?` or `#` ends the userinfo early when the URI is serialized, so `#to_s` names a different host than `#host` and `#origin` report.\n\nThe URI object keeps the component as assigned, and its own accessors agree with each other: `host` is the host the application set, and `origin` is built from it. `#to_s` joins the components with their delimiters but doesn't encode them, so `user = \"alice@evil.example/\"` serializes as `https://alice@evil.example/@api.example.com/…`. Addressable and Ruby's `URI` both read `evil.example` as the host of that string. A `[` or `]` in the userinfo makes the serialized URI fail to parse, a `:` in the user moves the rest of it into the password, and browsers read a `\\` as a `/`, ending the userinfo there. `#normalize` encodes all of these correctly.\n\nAn application that puts an untrusted value into the userinfo of a URI for a trusted host, checks `host` or `origin`, and then passes `to_s` to an HTTP client sends the request to a host the attacker chose. Headers or a body meant for the trusted service, such as an API token, go with it. The attacker needs the application to build URIs this way, so attack complexity is high.\n\n### Affected Versions\n\nThis vulnerability affects Addressable >= 2.0.0. In 2.9.2, `#userinfo=` ignores a value without a colon, so the injected text has to follow one, as in `u:x@evil.example/`. It is fixed in 2.10.0, where `#user=`, `#password=`, `#userinfo=`, `#authority=`, `URI.new` and `URI.parse` raise `InvalidURIError` for `/`, `?`, `#`, `[`, `]` or `\\` in the user or password, or `:` in the user. An `@` is still accepted: the last `@` ends the userinfo, so it reads the same once serialized.\n\n### Workarounds\n\n- Serialize with `uri.normalize.to_s`, which encodes the delimiters, instead of `uri.to_s`.\n- Encode userinfo values before assigning them, for example with `Addressable::URI.encode_component(value, Addressable::URI::CharacterClasses::UNRESERVED)`.\n- Check the host of the final string with `Addressable::URI.parse(uri.to_s).host`, not of the object.\n\n### Credits\n\nFound by Bob Aman (@sporkmonger).\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)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "addressable"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.10.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.9.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sporkmonger/addressable/security/advisories/GHSA-qrq6-rcpx-pmm6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sporkmonger/addressable/commit/651722f370f679ce4cdf64ed1d2c9527d5e6958b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sporkmonger/addressable"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sporkmonger/addressable/releases/tag/addressable-2.10.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-436", "CWE-74" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-01T23:52:47Z",
    "nvd_published_at" : null
  }
}