CVE-2026-141538
### 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 = "[email protected]/"` serializes as `https://[email protected]/@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:[email protected]/`. 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 us
Properties
- Summary
- Addressable URI userinfo setters store delimiters raw, so the serialized URI names a different host
- Severity
- medium
- Nvd fetched at
- 2026-12-02T06:37:54.190518+00:00
- Cvss score
- 4.8
- Cvss severity
- MEDIUM
- Retrieved at
- 2026-12-02T06:39:20+00:00
- Ghsa published
- 2026-12-01T23:52:47Z
- Source url
- https://github.com/advisories/GHSA-qrq6-rcpx-pmm6
- Ghsa updated
- 2026-12-01T23:52:48Z
- Ghsa id
- GHSA-qrq6-rcpx-pmm6
- Last source
- GitHub Advisory Database
- Score
- 4.8
- Cvss version
- 3.1
- Cve id
- CVE-2026-141538
- Cvss vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- First seen by Signal
- 2026-12-01T22:36:00+00:00
- Name
- CVE-2026-141538
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
- Published at
- 2026-12-01T22:18:04.063
Related Entities (4)
HAS_WEAKNESS (2)
AFFECTS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph