Addressable display_uri shows a deceptive label boundary for a host label that decodes to U+3002
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| sporkmongeraddressable | — | Not listed |
| RubyGemsaddressable |
< 2.10.0→ 2.10.0 |
2.10.0 |
Original description The description as published by the source.
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…
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web github.com
- web github.com