---
id: "CVE-2026-126350"
page: "https://infrastack.ai/live/CVE-2026-126350"
kind: "vulnerability"
aliases: ["CVE-2026-126350", "GHSA-j82w-28jv-3pmj"]
title: "Addressable: Regular Expression Denial of Service in templates with certain exploded expressions"
severity: "medium"
cvss: 5.9
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "addressable", "fixed": ["2.9.1"], "affected": ">= 2.3.0, < 2.9.1", "ecosystem": "rubygems"}]
ecosystems: ["rubygems"]
tags: ["addressable", "cwe-1333", "package", "ruby", "rubygems"]
not_affected_if: ["ruby-3.2-or-later", "template-expand-only", "truffleruby", "uri-parsing-only"]
published_at: "2026-11-12T22:19:20+00:00"
first_seen_at: "2026-11-12T22:31:51+00:00"
updated_at: "2026-11-12T22:40:38+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-j82w-28jv-3pmj", "first_seen_at": "2026-11-12T22:31:51+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126350", "first_seen_at": "2026-11-12T22:40:38+00:00"}]
exploit_sources: []
---

# Addressable: Regular Expression Denial of Service in templates with certain exploded expressions

Link for people: https://infrastack.ai/live/CVE-2026-126350 (this .md is for agents)

Addressable's URI template matching builds regular expressions that backtrack catastrophically when a crafted URI starts with the operator character of an exploded expression. An input under 60 bytes can tie up a thread for minutes, which is a denial of service.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- rubygems:addressable affected >= 2.3.0, < 2.9.1 fixed 2.9.1

## How to check

- Check the installed version with `bundle exec gem list addressable` or inspect `Gemfile.lock` for `addressable`, looking for a version at or above `2.3.2` and below `2.9.1`.
- Check the Ruby runtime with `ruby -v`; the flaw applies to MRI Ruby below `3.2` and to JRuby, not to MRI `3.2+` or TruffleRuby 40.0.
- Search the code for `Template#match` or `Template#extract` called on user-supplied input with templates using `*` with `/`, `.`, `;`, `?` or `&` operators.

## Fix

- `addressable` `2.9.1`

## Timeline

- 2026-11-12T22:31:51+00:00 ghsa https://github.com/advisories/GHSA-j82w-28jv-3pmj
- 2026-11-12T22:40:38+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126350

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/sporkmonger/addressable/security-advisories/GHSA-j82w-28jv-3pmj
- [advisory] Maintainer's advisory: github.com https://github.com/sporkmonger/addressable/security/advisories/GHSA-j82w-28jv-3pmj
- [fix] Patch: github.com https://github.com/sporkmonger/addressable/commit/26d1e9e8409a861571f9d0029022b6e9b9158b5e
- [fix] Release: github.com https://github.com/sporkmonger/addressable/releases/tag/addressable-2.9.1

## From the sources

### Impact

Within the URI template implementation in Addressable, templates using the `*` (explode) modifier with the `/`, `.`, `;`, `?` or `&` operators (e.g., `{/segments*}`, `{.ext*}`, `{;params*}`, `{?query*}`) generate regular expressions vulnerable to catastrophic backtracking. When `Template#match` or `Template#extract` is called with a maliciously crafted URI that starts with the operator's leading character, matching takes exponential time, leading to uncontrolled resource consumption and denial of service. An input under 60 bytes is enough to occupy a thread for minutes.

GHSA-h27x-rffw-24p4 (CVE-2026-35611) reported this pattern as fully remediated in 2.9.0. The 2.9.0 fix only made the joiner between exploded members mandatory for templates without an operator, and its regression specs used inputs that never start with the operator's leading character, so the vulnerable part of the expression was never reached. This issue was originally reported in #364 by @ebenoist in 2019 but insufficiently investigated.

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 only exploitable on Ruby implementations whose regular expression engine backtracks without memoization: MRI Ruby < 3.2 and JRuby. MRI Ruby 3.2 and later are not affected: their regular expression engine memoizes backtracking, so these patterns still match in linear time. TruffleRuby 40.0 is not affected either. 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 | Not affected |
| MRI Ruby 3.3 | Not affected |
| MRI Ruby 3.4 | Not affected |
| MRI Ruby 4.0 | Not affected |
| JRuby 9.4 | Vulnerable |
| TruffleRuby 40.0 | Not affected |

### Workarounds

- Upgrade to MRI Ruby 3.2 or later, if the consuming application does not use JRuby.
- Avoid matching user-supplied input on unpatched versions of the library against templates that use the `*` modifier with the `/`, `.`, `;`, `?` or `&` operators.
- Apply a short timeout around any call to `Template#match` or `Template#extract` that processes user-supplied data.

### Credits

Reported independently by @ebenoist, @andrewstellman, and then @halogenandtoast.

### For more information

If there are any questions or comments about this advisory:
* [Open an issue](https://github.com/sporkmonger/addressable/issues)

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
