CVE-2026-141527: Addressable Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-grhv-8jgq-r74x
CVSS 5.9
CWE-1333
Published
Advisory Summary

CVE-2026-141527 is a MODERATE (CVSS 5.9) denial of service vulnerability (CWE-1333: Inefficient Regular Expression Complexity) affecting Addressable libraries in the RubyGems ecosystem. The issue involves regular expression denial of service in templates with literal text between expressions. Remediation is available by upgrading affected packages to version 2.10.0.

CVE-2026-141527 at a Glance

CVE Identifier CVE-2026-141527
GHSA Identifier GHSA-grhv-8jgq-r74x
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-1333: Inefficient Regular Expression Complexity
Affected Product Addressable
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 5.9

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:N/I:N/A:H).

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 None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-141527

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-141527, 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-1333: Inefficient Regular Expression Complexity, where the product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential. 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 Within the URI template implementation in Addressable, templates with literal text between expressions generate regular expressions vulnerable to excessive backtracking when a variable before the literal text can also match it. Realistic templates are affected: - `/{year}-{month}-{day}`, where each variable can contain `-` - `/v{major}.{minor}.{patch}`, where each variable can contain `.` - `{+base}/{+path}/{+file}`, where each variable can contain `/` - `{+path}/{name}-{+rest}`, where `path` can contain `/` and `name` can contain `-` A run of the literal's characters can be divided among k variables in O(n^k) ways. When `Template#match` or `Template#extract` is called with a maliciously crafted URI, this can result in uncontrolled resource consumption, leading to denial of service. With 2.9.2, `/{year}-{month}-{day}` and `{+base}/{+path}/{+file}` each take about 10 seconds to reject 2 KB of input on MRI Ruby 2.7, and over 15 seconds on JRuby. Because the cost is cubic for these templates, request-size limits of a few kilobytes don't prevent it. GHSA-9f42-57jx-vpp3 covered expressions next to each other with no literal text between them. This shape wasn't covered by that advisory or its fix. Users of the URI parsing capabilities in Addressable but not the URI template matching capabilities are unaffected. Users who only call `Template#expand` are unaffected. ### Affected Versions This vulnerability affects Addressable >= 2.3.0 (note: 2.3.0 and 2.3.1 were yanked; the earliest installable release is 2.3.2), including 2.9.2. It is fixed in 2.10.0, with two exceptions where matching can still take polynomial time on MRI Ruby < 3.3, JRuby and TruffleRuby: when a processor's `match` method gives a variable its own pattern, since 2.10.0 then keeps every choice open, as earlier versions did, so that the pattern decides the values; and for some templates that combine an exploded variable, or several variables in one expression, with other expressions, such as `{+c*,d}{&b}.{b}`. The vulnerability is exploitable on Ruby implementations whose regular expression engine backtracks without memoization: MRI Ruby < 3.2 and JRuby. MRI Ruby 3.2 and later and TruffleRuby 40.0 are not affected by this issue, except that since 2.9.1, some templates that combine this shape with other expressions are slow on MRI Ruby 3.2, as described in GHSA-jrfq-gw62-2f3j. Earlier TruffleRuby versions were not tested. This has been confirmed on the following runtimes with Addressable 2.9.2: | Runtime | Status | |---------|--------| | MRI Ruby 2.7 | Vulnerable | | MRI Ruby 3.1 | Vulnerable | | MRI Ruby 3.2 | Not affected by this issue | | MRI Ruby 3.3 | Not affected | | MRI Ruby 4.0 | Not affected | | JRuby 9.4 | Vulnerable | | TruffleRuby 40.0 | Not affected | ### Workarounds - Upgrade to MRI Ruby 3.3 or later, if your application does not use JRuby. - Limit the length of user-supplied URIs before matching them. Because the cost is polynomial, this only bounds it, but it works on every runtime. - Apply a short timeout, such as `Timeout.timeout`, around any call to `Template#match` or `Template#extract` that processes user-supplied data. It interrupts the matching thread at an arbitrary point, so it isn't safe in every application. ### 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-141527 Affected Addressable Versions

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

References

Frequently Asked Questions

What is CVE-2026-141527?
CVE-2026-141527 is a security vulnerability in Addressable involving Regular Expression Denial of Service in templates with literal text between expressions under CWE-1333: Inefficient Regular Expression Complexity.
Which Addressable versions are affected?
Affected versions include releases prior to 2.10.0 across affected packages: addressable.
What version fixes CVE-2026-141527?
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-141527?
CVE-2026-141527 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-141527?
CVE-2026-141527 is classified under CWE-1333: Inefficient Regular Expression Complexity (The product uses a regular expression with a worst-case computational complexity that is inefficient and possibly exponential.).
How can I check RubyGems dependencies for CVE-2026-141527?
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-grhv-8jgq-r74x",
  "modified" : "2026-12-01T23:39:07Z",
  "published" : "2026-12-01T23:39:07Z",
  "aliases" : [ "CVE-2026-141527" ],
  "summary" : "Addressable: Regular Expression Denial of Service in templates with literal text between expressions",
  "details" : "### Impact\n\nWithin the URI template implementation in Addressable, templates with literal text between expressions generate regular expressions vulnerable to excessive backtracking when a variable before the literal text can also match it. Realistic templates are affected:\n\n- `/{year}-{month}-{day}`, where each variable can contain `-`\n- `/v{major}.{minor}.{patch}`, where each variable can contain `.`\n- `{+base}/{+path}/{+file}`, where each variable can contain `/`\n- `{+path}/{name}-{+rest}`, where `path` can contain `/` and `name` can contain `-`\n\nA run of the literal's characters can be divided among k variables in O(n^k) ways. When `Template#match` or `Template#extract` is called with a maliciously crafted URI, this can result in uncontrolled resource consumption, leading to denial of service. With 2.9.2, `/{year}-{month}-{day}` and `{+base}/{+path}/{+file}` each take about 10 seconds to reject 2 KB of input on MRI Ruby 2.7, and over 15 seconds on JRuby. Because the cost is cubic for these templates, request-size limits of a few kilobytes don't prevent it.\n\nGHSA-9f42-57jx-vpp3 covered expressions next to each other with no literal text between them. This shape wasn't covered by that advisory or its fix.\n\nUsers of the URI parsing capabilities in Addressable but not the URI template matching capabilities are unaffected. Users who only call `Template#expand` are unaffected.\n\n### Affected Versions\n\nThis vulnerability affects Addressable >= 2.3.0 (note: 2.3.0 and 2.3.1 were yanked; the earliest installable release is 2.3.2), including 2.9.2. It is fixed in 2.10.0, with two exceptions where matching can still take polynomial time on MRI Ruby < 3.3, JRuby and TruffleRuby: when a processor's `match` method gives a variable its own pattern, since 2.10.0 then keeps every choice open, as earlier versions did, so that the pattern decides the values; and for some templates that combine an exploded variable, or several variables in one expression, with other expressions, such as `{+c*,d}{&b}.{b}`.\n\nThe vulnerability is exploitable on Ruby implementations whose regular expression engine backtracks without memoization: MRI Ruby < 3.2 and JRuby. MRI Ruby 3.2 and later and TruffleRuby 40.0 are not affected by this issue, except that since 2.9.1, some templates that combine this shape with other expressions are slow on MRI Ruby 3.2, as described in GHSA-jrfq-gw62-2f3j. Earlier TruffleRuby versions were not tested.\n\nThis has been confirmed on the following runtimes with Addressable 2.9.2:\n\n| Runtime | Status |\n|---------|--------|\n| MRI Ruby 2.7 | Vulnerable |\n| MRI Ruby 3.1 | Vulnerable |\n| MRI Ruby 3.2 | Not affected by this issue |\n| MRI Ruby 3.3 | Not affected |\n| MRI Ruby 4.0 | Not affected |\n| JRuby 9.4 | Vulnerable |\n| TruffleRuby 40.0 | Not affected |\n\n### Workarounds\n\n- Upgrade to MRI Ruby 3.3 or later, if your application does not use JRuby.\n- Limit the length of user-supplied URIs before matching them. Because the cost is polynomial, this only bounds it, but it works on every runtime.\n- Apply a short timeout, such as `Timeout.timeout`, around any call to `Template#match` or `Template#extract` that processes user-supplied data. It interrupts the matching thread at an arbitrary point, so it isn't safe in every application.\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:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "addressable"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.3.0"
      }, {
        "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-grhv-8jgq-r74x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-141527"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/sporkmonger/addressable/commit/576662e4791df3cfd17c944041a98f516d3c0734"
  }, {
    "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-1333" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-01T23:39:07Z",
    "nvd_published_at" : "2026-12-01T21:17:12Z"
  }
}