MEDIUM · CVSS 3.1 4.3 EPSS 0.4% · 22th percentile CWE-1007CWE-20

CVE-2026-126348: Addressable display_uri can show misleading hosts with invalid Punycode A-labels

Published 2026-11-12 · Updated 2026-11-12 · Also known as GHSA-9crm-g4mf-wc5j

Summary

The pure-Ruby IDNA implementation in the Addressable gem incorrectly decodes invalid Punycode A-labels, causing Addressable::URI#display_uri to display misleading hostnames. Engineering teams using Addressable for display or trust comparisons should update their dependencies.

Who is affected

Applications using Addressable >= 2.0.0 with the pure-Ruby IDNA implementation are affected when rendering or validating URIs with invalid Punycode labels beginning with xn--. Because display_uri returns decoded forms for labels that should remain unchanged, attackers can display trusted hosts they do not actually control. This can lead to spoofing in user interfaces or bypasses in logic that compares display strings against trusted name lists.

Exploitability

The vulnerability has a CVSS base score of 4.3 (MEDIUM) with a vector of CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N, indicating network exploitability requiring user interaction. It carries an EPSS score of 0.003 and is not currently listed in the CISA Known Exploited Vulnerabilities catalog.

Remediation

How to check your project

Automated analysis of the published advisory data, generated 2026-11-19. Not human-reviewed; verify against the official advisory. How this works.

Affected packages

EcosystemPackageAffected versionsFixed inUpgrade
RubyGems addressable >= 2.0.0, < 2.9.1 2.9.1 bundle update addressable

CVSS 3.1 vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

Attack vectorNetwork
Attack complexityLow
Privileges requiredNone
User interactionRequired
ScopeUnchanged
ConfidentialityNone
IntegrityLow
AvailabilityNone

FAQ

Which software packages are affected by CVE-2026-126348?

The RubyGems package 'addressable' is affected for versions introduced at 2.0.0 and fixed in 2.9.1.

Does the native IDNA implementation suffer from this vulnerability?

No, the native IDNA implementation-used when libidn and the idn-ruby gem are installed-is not affected.

Are to_ascii and normalized_host affected?

No, to_ascii and normalized_host are not affected by this vulnerability.

Original advisory description
### Impact `Addressable::IDNA.to_unicode`, in the pure-Ruby IDNA implementation, decodes Punycode labels (labels beginning with `xn--`) that are not valid A-labels. Those labels are returned in decoded form, when they should be returned unchanged. That includes: - labels that decode to only ASCII characters, e.g. `xn--google-` decodes to `google`; - labels that decode to text that doesn't convert back to the same label (RFC 3490 §4.2), e.g. text that isn't in normalized form. `Addressable::URI#display_uri` uses `to_unicode`, so for `https://xn--google-.example.org/` it displays the host `google.example.org`, while `#host`, `#normalized_host` and any connection made from the URI use `xn--google-.example.org`. An attacker who controls a domain can therefore have a URI displayed as a host they don't control. Applications that compare the result of `to_unicode` against a list of trusted names can likewise treat two different hosts as the same. The native IDNA implementation, used when libidn and the `idn-ruby` gem are installed, is not affected. `to_ascii` and `normalized_host` are not affected. ### Affected Versions This vulnerability affects Addressable >= 2.0.0, the first version with the pure-Ruby IDNA implementation, when that implementation is in use. It is fixed in 2.9.1, where such labels are returned unchanged, as with libidn. ### Workarounds - Install libidn and the `idn-ruby` gem, so that Addressable uses the native IDNA implementation. - Don't make security decisions on `display_uri` or `to_unicode` output. Compare hosts using `normalized_host`. ### Credits Reported by @tonghuaroot. ### For more information If there are any questions or comments about this advisory: * [Open an issue](https://github.com/sporkmonger/addressable/issues)

References

Source records: GHSA-9crm-g4mf-wc5j (OSV.dev) · EPSS by FIRST, 2026-11-26.