GHSA-x378-rg7m-2c49

Suggest an improvement
Source
https://github.com/advisories/GHSA-x378-rg7m-2c49
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-x378-rg7m-2c49/GHSA-x378-rg7m-2c49.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-x378-rg7m-2c49
Aliases
Downstream
CGA (9)
Published
2026-12-01T23:49:19Z
Modified
2026-12-02T00:00:04Z
Severity
  • 3.1 (Low) CVSS_V3 - CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N CVSS Calculator
Summary
Addressable display_uri shows a deceptive label boundary for a host label that decodes to U+3002
Details

Impact

IDNA2003 requires U+3002 IDEOGRAPHIC FULL STOP, U+FF0E FULLWIDTH FULL STOP and U+FF61 HALFWIDTH IDEOGRAPHIC FULL STOP to be recognized as dots, and treats two domain names as the same whichever of these separators they use (Section 3.1 of RFC 3490). Addressable::IDNA.to_unicode, and so Addressable::URI#display_uri, decodes an A-label whose Unicode form contains U+3002, with both the pure-Ruby and the native IDNA implementations. xn--victimexample-882l.attacker.example is incorrectly displayed as victim。example.attacker.example. It should instead be rendered as itself.

With the native implementation, Addressable::URI.parse(uri.display_uri.to_s).normalized_host gives victim.example.attacker.example. An application that stores or passes on this display_uri output and later parses it again, or compares it with other domain names, gets a different host. A user reading the displayed host sees a label boundary that isn't in the real host.

However, exploitability is limited. The labels to the right of the decoded label, including the registrable domain, are displayed unchanged, so this can't make a host the attacker doesn't control appear as the URI's host. Within a domain the attacker controls, the displayed host looks like a subdomain the attacker could create anyway. The host moves to a different registrable domain only when the decoded label is itself the registrable domain, which needs a registry to accept a label with U+3002. Exploitation also needs an application that relies on the displayed form, so attack complexity is high.

Affected Versions

This vulnerability affects Addressable >= 2.0.0. It is fixed in 2.10.0, where to_unicode returns a label unchanged when it decodes to any of the label separators U+3002, U+FF0E or U+FF61, with either implementation. The pure-Ruby to_ascii also treats U+3002 and U+FF61 as label separators in 2.10.0, as RFC 3490 requires and libidn does.

Workarounds

  • Don't store, parse again or compare display_uri or to_unicode output. Keep the URI, and compare hosts using normalized_host.
  • Before showing display_uri.host, check it for U+3002, U+FF0E or U+FF61, and show normalized_host instead if it has one.

Proof of Concept

require "addressable/uri"

uri = Addressable::URI.parse("https://xn--victimexample-882l.attacker.example/")
puts uri.display_uri.host
puts Addressable::URI.parse(uri.display_uri.to_s).normalized_host

With the native implementation, affected versions print:

victim。example.attacker.example
victim.example.attacker.example

With the pure-Ruby implementation, the second line is xn--victimexample-882l.attacker.example. Fixed versions print xn--victimexample-882l.attacker.example on both lines, with either implementation.

Credits

Reported by @andrewstellman.

For more information

If there are any questions or comments about this advisory:

Database specific
{
    "cwe_ids":  [
        "CWE-1007",
        "CWE-451"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-12-01T23:49:19Z",
    "nvd_published_at":  null,
    "severity":  "LOW"
}
References

Affected packages

RubyGems / addressable

Package

Name
addressable
Purl
pkg:gem/addressable

Affected ranges

Type
ECOSYSTEM
Events
Introduced
2.0.0
Fixed
2.10.0

Affected versions

2.*
2.0.0
2.0.1
2.0.2
2.1.0
2.1.1
2.1.2
2.2.0
2.2.1
2.2.2
2.2.3
2.2.4
2.2.5
2.2.6
2.2.7
2.2.8
2.3.2
2.3.3
2.3.4
2.3.5
2.3.6
2.3.7
2.3.8
2.4.0
2.5.0
2.5.1
2.5.2
2.6.0
2.7.0
2.8.0
2.8.1
2.8.2
2.8.3
2.8.4
2.8.5
2.8.6
2.8.7
2.8.8
2.8.9
2.8.10
2.9.0
2.9.1
2.9.2

Database specific

last_known_affected_version_range
"<= 2.9.2"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/12/GHSA-x378-rg7m-2c49/GHSA-x378-rg7m-2c49.json"