{"id":"CVE-2026-126349","aliases":["CVE-2026-126349","GHSA-539f-xcgw-2gjg"],"related":[],"kind":"vulnerability","state":"published","title":"Addressable display_uri can show misleading hosts containing bidi and invisible characters","summary":"Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.0.0 until 2.9.1, Addressable::IDNA.to_unicode can decode Punycode labels that contain bidirectional controls, zero-width characters, control characters, or other default-ignorable format characters. Addressable::URI#display_uri can consequently show a reordered or visually indistinguishable hostname even though host, normalized_host, and network connections use the original encoded hostname. The pure-Ruby backend accepts the full prohibited set, while the native libidn backend is affected from 2.5.2 for characters added after Unicode 3.2. This issue is fixed in version 2.9.1.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.0.0 until 2.9.1, Addressable::IDNA.to_unicode can decode Punycode labels that contain bidirectional controls, zero-width characters, control characters, or other default-ignorable format characters. Addressable::URI#display_uri can consequently show a reordered or visually indistinguishable hostname even though host, normalized_host, and network connections use the original encoded hostname. The pure-Ruby backend accepts the full prohibited set, while the native libidn backend is affected from 2.5.2 for characters added after Unicode 3.2. This issue is fixed in version 2.9.1.","source":"cvelist"},{"lang":"en","text":"### Impact\n\n`Addressable::IDNA.to_unicode` decodes Punycode labels (labels beginning with `xn--`) that contain characters which change how text is displayed without being visible themselves. These include bidirectional controls such as U+202E RIGHT-TO-LEFT OVERRIDE and U+2066–U+2069, zero-width characters, and other invisible format characters. `Addressable::URI#display_uri` uses `to_unicode`, so it can display a host whose characters appear reordered or which looks identical to a different host. For example, the host of `http://xn--abcmoc-dm0c.com/` is displayed as `abc`, U+202E, `moc.com`, and the override makes everything after `abc` render right to left.\n\nParsing, `host`, `normalized_host` and any connection made from the URI are not affected. Only the displayed form is. Applications that show `display_uri` to users (link previews, chat and email clients, admin interfaces) can be used to make a malicious domain look like a trusted one.\n\n- In the pure-Ruby IDNA implementation, all such characters are decoded, including those that IDNA's nameprep profile prohibits.\n- In the native IDNA implementation, used when libidn and the `idn-ruby` gem are installed, libidn rejects most of them, but not characters added to Unicode after version 3.2, such as U+061C and U+2066–U+2069.\n\n### Affected Versions\n\nThe pure-Ruby IDNA implementation is affected in Addressable >= 2.0.0. The native IDNA implementation is affected in Addressable >= 2.5.2, when `to_unicode` began accepting characters unassigned in Unicode 3.2. It is fixed in 2.9.1 for both implementations, where such labels are returned unchanged.\n\n### Workarounds\n\n- Install libidn and the `idn-ruby` gem, so that Addressable uses the native IDNA implementation. This reduces the affected characters to those added since Unicode 3.2.\n- Check displayed hosts for bidirectional and invisible characters (e.g., `/[\\p{Cc}\\p{Cf}\\p{Default_Ignorable_Code_Point}]/`) and fall back to `normalized_host` when one is present.\n\n### Credits\n\nReported by @andrewstellman.\n\n### For more information\n\nIf there are any questions or comments about this advisory:\n* [Open an issue](https://github.com/sporkmonger/addressable/issues)","format":"markdown","source":"ghsa"}],"published":"2026-11-12T22:00:22.516Z","modified":"2026-11-16T20:18:59.913Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N","score":3.1,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N","score":3.1,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:L/A:N","score":3.1,"rating":"LOW"}],"cwes":["CWE-176","CWE-451","CWE-1007"],"affected":[{"ranges":[{"version":">= 2.0.0, < 2.9.1","status":"affected"}],"vendor":"sporkmonger","product":"addressable","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"2.0.0","status":"affected","fixed":"2.9.1"}],"ecosystem":"RubyGems","package":"addressable","purl":"pkg:gem/addressable","source":"ghsa"}],"references":[{"url":"https://github.com/sporkmonger/addressable/security/advisories/GHSA-539f-xcgw-2gjg","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sporkmonger/addressable/commit/60455d32bb59fda2585a0e1865a9fcb21e8e55b1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/sporkmonger/addressable/releases/tag/addressable-2.9.1","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rubysec/ruby-advisory-db/blob/master/gems/addressable/GHSA-539f-xcgw-2gjg.yml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/sporkmonger/addressable","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2026-11-16T19:34:20.634Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-126349","url":"https://www.cve.org/CVERecord?id=CVE-2026-126349","licence":"CVE Terms of Use","modified":"2026-11-16T19:34:33.301Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-539f-xcgw-2gjg","url":"https://github.com/advisories/GHSA-539f-xcgw-2gjg","licence":"CC-BY-4.0","modified":"2026-11-12T23:00:05.606Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-126349","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126349","licence":"Public domain","modified":"2026-11-16T20:18:59.913Z"}],"updatedAt":"2026-11-25T22:59:50.571Z","epss":{"score":0.00255,"percentile":0.18249,"date":"2026-12-01T12:00:22.000Z"}}