BREW-TRAVIS-CVE-2026-126352 (GHSA-9F42-57JX-VPP3)

Vulnerability from osv_homebrew – Published: 2026-11-13 10:23 – Updated: 2026-11-13 17:38 – Source website
VLAI
Summary
Addressable: Regular Expression Denial of Service in templates with multiple variables
Details

Impact

Within the URI template implementation in Addressable, templates that put several variables in one expression generate regular expressions vulnerable to excessive backtracking:

  1. Expressions with any operator other than + and # (e.g., {/owner,repo,ref}, {.a,b}, {a,b,c}, {;a,b,c}). The values are joined by an optional separator, so a run of characters can be divided among the variables in O(n^k) ways for k variables.
  2. Expressions with the + or # operators and many variables (e.g., {+v1,v2,v3,v4,v5,v6,v7,v8,v9,v10}). A failing match is exponential in the number of variables.
  3. Several single-variable expressions next to each other (e.g., {+a}{+b}{+c} or {a}{b}{c}), which are polynomial in the input length.

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. A three-variable path template such as http://example.com/repos{/owner,repo,ref} needs about 2 KB of input to occupy a thread for many seconds.

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.0. It is fixed in 2.9.1.

The vulnerability is exploitable on Ruby implementations whose regular expression engine backtracks without memoization: MRI Ruby < 3.2 and JRuby. The second form, many-variable + and # expressions, is also exploitable on MRI Ruby 3.2, which does not memoize a regular expression that contains possessive quantifiers, and 2.9.0 generates those for these operators. It is also exploitable on TruffleRuby 40.0, whose regular expression engine falls back to backtracking for them. MRI Ruby 3.3 and later are not affected by any form, because they memoize those regular expressions too. TruffleRuby 40.0 is not affected by the other two forms. Earlier TruffleRuby versions were not tested.

This has been confirmed on the following runtimes with Addressable 2.9.0:

Runtime Status
MRI Ruby 2.7 Vulnerable
MRI Ruby 3.1 Vulnerable
MRI Ruby 3.2 Vulnerable
MRI Ruby 3.3 Not affected
MRI Ruby 3.4 Not affected
MRI Ruby 4.0 Not affected
JRuby 9.4 Vulnerable
JRuby 10.1 Vulnerable
TruffleRuby 40.0 Vulnerable

Workarounds

  • Upgrade to MRI Ruby 3.3 or later, if a consuming application does not use JRuby or TruffleRuby.
  • Avoid matching user-supplied input on unpatched versions of the library against templates with several variables in one expression, or with several expressions next to each other.
  • Apply a short timeout around any call to Template#match or Template#extract that processes user-supplied data.

Credits

Reported by Matthew Mongeau (@halogenandtoast), Ruby Central Gem Security.

For more information

If there are any questions or comments about this advisory: * Open an issue

Impacted products
Ecosystem Package Version
Homebrew travis
pkg:brew/travis
Affected: ≥ 1.8.8, < 1.11.1_2 (ecosystem)

{
  "affected": [
    {
      "ecosystem_specific": {
        "fix": "bump",
        "range_state": "fixed",
        "resource": "addressable",
        "resource_purl": "pkg:gem/addressable@2.8.6",
        "upstream_fixed_in": "2.9.1"
      },
      "package": {
        "ecosystem": "Homebrew",
        "name": "travis",
        "purl": "pkg:brew/travis"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "1.8.8"
            },
            {
              "fixed": "1.11.1_2"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "confidence": "high",
    "source": "matched",
    "strategy": "registry",
    "upstream_evidence": [
      {
        "ecosystem": "RubyGems",
        "key": "pkg:gem/addressable@2.8.6",
        "name": "addressable",
        "resource": "addressable",
        "strategy": "registry",
        "subject_version": "2.8.6"
      }
    ]
  },
  "details": "### Impact\n\nWithin the URI template implementation in Addressable, templates that put several variables in one expression generate regular expressions vulnerable to excessive backtracking:\n\n1. Expressions with any operator other than `+` and `#` (e.g., `{/owner,repo,ref}`, `{.a,b}`, `{a,b,c}`, `{;a,b,c}`). The values are joined by an optional separator, so a run of characters can be divided among the variables in O(n^k) ways for k variables.\n2. Expressions with the `+` or `#` operators and many variables (e.g., `{+v1,v2,v3,v4,v5,v6,v7,v8,v9,v10}`). A failing match is exponential in the number of variables.\n3. Several single-variable expressions next to each other (e.g., `{+a}{+b}{+c}` or `{a}{b}{c}`), which are polynomial in the input length.\n\nWhen `Template#match` or `Template#extract` is called with a maliciously crafted URI, this can result in uncontrolled resource consumption, leading to denial of service. A three-variable path template such as `http://example.com/repos{/owner,repo,ref}` needs about 2 KB of input to occupy a thread for many seconds.\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 \u003e= 2.3.0 (note: 2.3.0 and 2.3.1 were yanked; the earliest installable release is 2.3.2), including 2.9.0. It is fixed in 2.9.1.\n\nThe vulnerability is exploitable on Ruby implementations whose regular expression engine backtracks without memoization: MRI Ruby \u003c 3.2 and JRuby. The second form, many-variable `+` and `#` expressions, is also exploitable on MRI Ruby 3.2, which does not memoize a regular expression that contains possessive quantifiers, and 2.9.0 generates those for these operators. It is also exploitable on TruffleRuby 40.0, whose regular expression engine falls back to backtracking for them. MRI Ruby 3.3 and later are not affected by any form, because they memoize those regular expressions too. TruffleRuby 40.0 is not affected by the other two forms. Earlier TruffleRuby versions were not tested.\n\nThis has been confirmed on the following runtimes with Addressable 2.9.0:\n\n| Runtime | Status |\n|---------|--------|\n| MRI Ruby 2.7 | Vulnerable |\n| MRI Ruby 3.1 | Vulnerable |\n| MRI Ruby 3.2 | Vulnerable |\n| MRI Ruby 3.3 | Not affected |\n| MRI Ruby 3.4 | Not affected |\n| MRI Ruby 4.0 | Not affected |\n| JRuby 9.4 | Vulnerable |\n| JRuby 10.1 | Vulnerable |\n| TruffleRuby 40.0 | Vulnerable |\n\n### Workarounds\n\n- Upgrade to MRI Ruby 3.3 or later, if a consuming application does not use JRuby or TruffleRuby.\n- Avoid matching user-supplied input on unpatched versions of the library against templates with several variables in one expression, or with several expressions next to each other.\n- Apply a short timeout around any call to `Template#match` or `Template#extract` that processes user-supplied data.\n\n### Credits\n\nReported by Matthew Mongeau (@halogenandtoast), Ruby Central Gem Security.\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)",
  "id": "BREW-travis-CVE-2026-126352",
  "modified": "2026-11-13T17:38:24Z",
  "published": "2026-11-13T10:23:57Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/sporkmonger/addressable/security/advisories/GHSA-9f42-57jx-vpp3"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sporkmonger/addressable/commit/f2b27b3ab252e56b3fa3519f7ebb491d54cf7b7c"
    },
    {
      "type": "WEB",
      "url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/addressable/GHSA-9f42-57jx-vpp3.yml"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/sporkmonger/addressable"
    },
    {
      "type": "WEB",
      "url": "https://github.com/sporkmonger/addressable/releases/tag/addressable-2.9.1"
    }
  ],
  "schema_version": "1.7.3",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "Addressable: Regular Expression Denial of Service in templates with multiple variables",
  "upstream": [
    "GHSA-9f42-57jx-vpp3",
    "CVE-2026-126352"
  ]
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.