CVE-2026-141535
### Impact `Addressable::URI.parse` accepts a host in brackets even when the text inside isn't an IPv6 address or an IPvFuture literal, such as `http://[127.0.0.1]/` or `http://[localhost]/`. `#host` keeps the brackets, but `#hostname` strips them, so code that checks `host` and connects to `hostname` checks one name and connects to another. `Net::HTTP` connects to `hostname` when given an Addressable URI. RFC 3986 §3.2.2 allows brackets only around an IP-literal: an IPv6 address or an IPvFuture literal (`v1.…`). Ruby's `URI` and curl reject anything else. The bracketed form of a name or IPv4 address doesn't resolve: `IPAddr.new("[127.0.0.1]")` raises and `Resolv.getaddresses("[127.0.0.1]")` returns `[]`, while the stripped form resolves normally. A valid IPv6 literal such as `[::1]` isn't affected, because `IPAddr` accepts its bracketed form. An application is affected if it: - parses an untrusted URL with Addressable, - checks the destination using `#host`, and permits a host through even if it doesn't resolve, and - connects using `#hostname`, for example by passing the Addressable URI to `Net::HTTP`. The request then reaches loopback or another internal address that the check would otherwise have blocked. A check that treats names that don't resolve as blocked isn't affected. ### Affected Versions This vulnerability affects Addressable >= 2.3.5, where `#hostname` began stripping the brackets from any bracketed host. In earlier versions, `#hostname` doesn't exist or returns the host unchanged. It is fixed in 2.10.0, where `URI.parse`, `URI.new` and the host setters raise `InvalidURIError` for brackets in a host that don't enclose an IPv6 address or an IPvFuture literal, as Ruby's `URI` does. ### Workarounds - Check the same value used to connect: generally prefer `hostname` over `host` for SSRF checks, avoid checking `host` but then connecting to `hostname`, only connect to the same address that an SSRF check was performed on. - Reject a URI whose `host`
Properties
- Summary
- Addressable URI#hostname strips brackets from hosts that aren't IP literals
- Severity
- low
- Nvd fetched at
- 2026-12-02T06:37:54.190518+00:00
- Cvss score
- 3.7
- Cvss severity
- LOW
- Retrieved at
- 2026-12-02T06:39:20+00:00
- Ghsa published
- 2026-12-01T23:55:10Z
- Source url
- https://github.com/advisories/GHSA-c7j3-jq7p-v3pr
- Ghsa updated
- 2026-12-01T23:55:12Z
- Ghsa id
- GHSA-c7j3-jq7p-v3pr
- Last source
- GitHub Advisory Database
- Score
- 3.7
- Cvss version
- 3.1
- Cve id
- CVE-2026-141535
- Cvss vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
- First seen by Signal
- 2026-12-01T22:36:00+00:00
- Name
- CVE-2026-141535
- Is ghsa only
- false
- Vector
- CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N
- Published at
- 2026-12-01T22:18:03.577
Related Entities (5)
HAS_WEAKNESS (3)
AFFECTS (1)
VULNERABLE_TO (1)
Related research
Explore deeper with Ninja Signal's threat intelligence graph