RubyGems
CVE-2026-141539
Addressable native IDNA backend truncates a host at a pct-encoded NUL when normalizing
- Severity
- Medium 4.8
- Published
- 1 Dec 2026
- Last changed
- 2 Dec 2026
- Added to UpHeron
- 2 Dec 2026
- Fixed in
- 2.10.0
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Read some data · Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N- Also known as
- GHSA-mrrj-5mhw-rcf2
- Sources
- OSV.dev and GitHub
Description
With the native IDNA backend, which Addressable uses when the idn-ruby gem is installed, a host with a pct-encoded NUL is cut short when it is normalized. Addressable::URI#normalized_host decodes the host and passes each label to libidn, which reads the NUL as the end of the string and drops the rest of the label. http://internal.example%00x/ normalizes to http://internal.example/.
#host and #to_s keep the host as written, while #normalize, #normalized_host, #normalized_authority, #normalized_site, #origin and #display_uri give the shortened host, and #== treats the URI as equal to one with the shortened host. An application that checks one form and uses the other can be made to send a request to a host it meant to block: a denylist check of uri.host lets internal.example%00x through, and a request built from uri.normalize or uri.origin goes to internal.example. An application would need to mix the two to be vulnerable.
Workarounds
- Check the same host you use: if the request is made from uri.normalize or uri.origin, check uri.normalize.host, not uri.host.
- Reject a URI whose host contains %00.
- Remove the idn-ruby gem, so Addressable uses the pure-Ruby backend.
Affected software
| Software | Affected versions |
|---|---|
addressableRubyGems · osv:RubyGems:addressable |
|
About addressable
- Total downloads (RubyGems)
- 1,323,514,580RubyGems, 1 Dec 2026
Vulnerabilities in addressable
- In our list
- 20
- Published in the last 12 months
- 20
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-141532Addressable URI#origin= takes the host from the userinfoLow 3.7 2 Dec 2026
- CVE-2026-141536Addressable URI#request_uri returns control characters unencoded with possible HTTP request splittingLow 3.7 1 Dec 2026
- CVE-2026-141535Addressable URI#hostname strips brackets from hosts that aren't IP literalsLow 3.7 1 Dec 2026
- CVE-2026-141537Addressable URI normalization takes quadratic time on long runs of combining marksLow 3.7 1 Dec 2026
- CVE-2026-141538Addressable URI userinfo setters store delimiters raw, so the serialized URI names a different hostMedium 4.8 1 Dec 2026
- CVE-2026-141531Addressable display_uri shows a deceptive label boundary for a host label that decodes to U+3002Low 3.1 1 Dec 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-141539
- GitHub Advisory Database https://github.com/advisories/GHSA-mrrj-5mhw-rcf2