Improper Validation of Syntactic Correctness of Input Affecting addressable package, versions >=2.0.0, <2.9.1


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.36% (23rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-RUBY-ADDRESSABLE-22840129
  • published24 Nov 2026
  • disclosed12 Nov 2026
  • credittonghuaroot

Introduced: 12 Nov 2026

NewCVE-2026-126348  (opens in a new tab)
CWE-1007  (opens in a new tab)
CWE-1286  (opens in a new tab)
CWE-20  (opens in a new tab)

How to fix?

Upgrade addressable to version 2.9.1 or higher.

Overview

addressable is an is an alternative implementation to the URI implementation that is part of Ruby's standard library.

Affected versions of this package are vulnerable to Improper Validation of Syntactic Correctness of Input via the to_unicode function in the pure-Ruby IDNA implementation. When that implementation is in use, an attacker who controls a domain can send a URI containing an invalid Punycode A-label, such as xn--google-, which to_unicode decodes to google; display_uri then shows a host that differs from the domain the URI actually uses. Users can mistake the displayed host for a trusted one, and applications that compare to_unicode output against trusted names can treat different hosts as the same.

Notes

  • The backend is a deployment gate: the flaw affects requests only when Addressable uses its pure-Ruby IDNA implementation; the native implementation used with libidn and the idn-ruby gem is unaffected.

Workarounds

  • Install libidn and the idn-ruby gem so Addressable uses the unaffected native IDNA implementation; this prevents invalid A-labels from being misleadingly decoded.
  • Use normalized_host for host comparisons, and don’t make security decisions using display_uri or to_unicode; this prevents treating a different host as a trusted one.

CVSS Base Scores

version 4.0
version 3.1