CVE-2026-141539: Addressable Addressable Native IDNA Backend Truncates Vulnerability

MODERATE
Advisory Identifier: GHSA-mrrj-5mhw-rcf2
CVSS 4.8
CWE-158 CWE-626
Published
Advisory Summary

CVE-2026-141539 is a MODERATE (CVSS 4.8) addressable native idna backend truncates vulnerability (CWE-158: Improper Neutralization of Null Byte or NUL Character) affecting Addressable libraries in the RubyGems ecosystem. The issue involves addressable native idna backend truncates a host at a pct-encoded nul when normalizing. Remediation is available by upgrading affected packages to version 2.10.0.

CVE-2026-141539 at a Glance

CVE Identifier CVE-2026-141539
GHSA Identifier GHSA-mrrj-5mhw-rcf2
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-158: Improper Neutralization of Null Byte or NUL Character
Affected Product Addressable
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 4.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-141539

To remediate this vulnerability, upgrade all affected Addressable dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

addressable fixed: 2.10.0
Upgrade addressable to 2.10.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for addressable

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-141539, inspect your project dependencies for Addressable:

inspect dependencies for addressable

Analyze the terminal output to locate any version of Addressable in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-158: Improper Neutralization of Null Byte or NUL Character, where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes nul characters or null bytes when they are sent to a downstream component. In Addressable, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact With the native IDNA backend, which Addressable uses when the `idn-ruby` gem is installed, a host with a pct-encoded NUL is cut short when it is normalized. `Addressable::URI#normalized_host` decodes the host and passes each label to libidn, which reads the NUL as the end of the string and drops the rest of the label. `http://internal.example%00x/` normalizes to `http://internal.example/`. `#host` and `#to_s` keep the host as written, while `#normalize`, `#normalized_host`, `#normalized_authority`, `#normalized_site`, `#origin` and `#display_uri` give the shortened host, and `#==` treats the URI as equal to one with the shortened host. An application that checks one form and uses the other can be made to send a request to a host it meant to block: a denylist check of `uri.host` lets `internal.example%00x` through, and a request built from `uri.normalize` or `uri.origin` goes to `internal.example`. An application would need to mix the two to be vulnerable. The pure-Ruby IDNA backend, used when `idn-ruby` isn't installed, keeps the NUL and isn't affected. ### Affected Versions This vulnerability affects Addressable >= 2.2.5 when the `idn-ruby` gem is installed. It is fixed in 2.10.0, where the native backend leaves a label with a NUL unchanged, as the pure-Ruby backend does. ### Workarounds - Check the same host you use: if the request is made from `uri.normalize` or `uri.origin`, check `uri.normalize.host`, not `uri.host`. - Reject a URI whose host contains `%00`. - Remove the `idn-ruby` gem, so Addressable uses the pure-Ruby backend. ### Credits Found by Bob Aman (@sporkmonger). ### For more information If there are any questions or comments about this advisory: * [Open an issue](https://github.com/sporkmonger/addressable/issues)

CVE-2026-141539 Affected Addressable Versions

1 component(s)
Fixed Versions:
2.10.0
Product / Package Ecosystem Affected Versions Fixed Version
addressable
RubyGems
≥ 2.2.5
< 2.10.0
2.10.0

References

Frequently Asked Questions

What is CVE-2026-141539?
CVE-2026-141539 is a security vulnerability in Addressable involving Addressable native IDNA backend truncates a host at a pct-encoded NUL when normalizing under CWE-158: Improper Neutralization of Null Byte or NUL Character.
Which Addressable versions are affected?
Affected versions include releases prior to 2.10.0 across affected packages: addressable.
What version fixes CVE-2026-141539?
Upgrading to 2.10.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is addressable affected?
Yes, addressable is affected in releases prior to 2.10.0. Upgrade your dependency to 2.10.0 or later.
What is the CVSS score of CVE-2026-141539?
CVE-2026-141539 has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2026-141539?
CVE-2026-141539 is classified under CWE-158: Improper Neutralization of Null Byte or NUL Character (The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes NUL characters or null bytes when they are sent to a downstream component.).
How can I check RubyGems dependencies for CVE-2026-141539?
Run the dependency tree command: 'inspect dependencies for addressable'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mrrj-5mhw-rcf2",
  "modified" : "2026-12-01T23:50:07Z",
  "published" : "2026-12-01T23:50:07Z",
  "aliases" : [ "CVE-2026-141539" ],
  "summary" : "Addressable native IDNA backend truncates a host at a pct-encoded NUL when normalizing",
  "details" : "### Impact\n\nWith the native IDNA backend, which Addressable uses when the `idn-ruby` gem is installed, a host with a pct-encoded NUL is cut short when it is normalized. `Addressable::URI#normalized_host` decodes the host and passes each label to libidn, which reads the NUL as the end of the string and drops the rest of the label. `http://internal.example%00x/` normalizes to `http://internal.example/`.\n\n`#host` and `#to_s` keep the host as written, while `#normalize`, `#normalized_host`, `#normalized_authority`, `#normalized_site`, `#origin` and `#display_uri` give the shortened host, and `#==` treats the URI as equal to one with the shortened host. An application that checks one form and uses the other can be made to send a request to a host it meant to block: a denylist check of `uri.host` lets `internal.example%00x` through, and a request built from `uri.normalize` or `uri.origin` goes to `internal.example`. An application would need to mix the two to be vulnerable.\n\nThe pure-Ruby IDNA backend, used when `idn-ruby` isn't installed, keeps the NUL and isn't affected.\n\n### Affected Versions\n\nThis vulnerability affects Addressable >= 2.2.5 when the `idn-ruby` gem is installed. It is fixed in 2.10.0, where the native backend leaves a label with a NUL unchanged, as the pure-Ruby backend does.\n\n### Workarounds\n\n- Check the same host you use: if the request is made from `uri.normalize` or `uri.origin`, check `uri.normalize.host`, not `uri.host`.\n- Reject a URI whose host contains `%00`.\n- Remove the `idn-ruby` gem, so Addressable uses the pure-Ruby backend.\n\n### Credits\n\nFound by Bob Aman (@sporkmonger).\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)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "addressable"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.5"
      }, {
        "fixed" : "2.10.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.9.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/sporkmonger/addressable/security/advisories/GHSA-mrrj-5mhw-rcf2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sporkmonger/addressable/commit/19da0e8a2f4aed2328b25cbde83d7053890d8972"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/sporkmonger/addressable"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sporkmonger/addressable/releases/tag/addressable-2.10.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-158", "CWE-626" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-01T23:50:07Z",
    "nvd_published_at" : null
  }
}