---
id: "CVE-2026-126351"
page: "https://infrastack.ai/live/CVE-2026-126351"
kind: "vulnerability"
aliases: ["CVE-2026-126351", "GHSA-qq38-m9mg-xjj5"]
title: "Addressable: Denial of service in URI path normalization"
severity: "medium"
cvss: 5.9
epss: null
exploited: false
status: "open"
category: "package"
products: [{"name": "addressable", "fixed": ["2.9.1"], "affected": "< 2.9.1", "ecosystem": "rubygems"}]
ecosystems: ["rubygems"]
tags: ["addressable", "cwe-407", "package", "ruby", "rubygems", "web-apps"]
not_affected_if: ["no-untrusted-uris", "patched-2.9.1", "uri-parse-only"]
published_at: "2026-11-12T22:19:20+00:00"
first_seen_at: "2026-11-12T22:36:52+00:00"
updated_at: "2026-11-12T22:40:38+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-qq38-m9mg-xjj5", "first_seen_at": "2026-11-12T22:36:52+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126351", "first_seen_at": "2026-11-12T22:40:38+00:00"}]
exploit_sources: []
---

# Addressable: Denial of service in URI path normalization

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

Addressable's path normalization removes dot segments one pass at a time, so cost grows with the square of the path length. A remote attacker who gets a crafted URI from user input into normalize, ==, or join can tie up CPU for seconds per call.

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

## Affected

- rubygems:addressable affected < 2.9.1 fixed 2.9.1

## How to check

- Check the installed version with `gem list addressable` or `bundle exec gem list addressable`, or look at `Gemfile.lock` for `addressable`.
- Search your code for calls to `normalize`, `normalized_path`, `==`, `===` or `join` on URIs built from request input, headers or stored data.

## Fix

- `addressable` `2.9.1` (affected: all versions before `2.9.1`)

## Timeline

- 2026-11-12T22:36:52+00:00 ghsa https://github.com/advisories/GHSA-qq38-m9mg-xjj5
- 2026-11-12T22:40:38+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126351

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/sporkmonger/addressable/security-advisories/GHSA-qq38-m9mg-xjj5
- [advisory] Maintainer's advisory: github.com https://github.com/sporkmonger/addressable/security/advisories/GHSA-qq38-m9mg-xjj5
- [fix] Patch: github.com https://github.com/sporkmonger/addressable/commit/25c7c412a2f7e06c3cac92872e831f6d053703c5
- [fix] Release: github.com https://github.com/sporkmonger/addressable/releases/tag/addressable-2.9.1

## From the sources

### Impact

`Addressable::URI.normalize_path` takes time quadratic in the number of nested dot segments in a path (e.g., `"/" + "a/" * n + "../" * n`, which for n = 3 is `/a/a/a/../../../`), because it removes one dot segment per pass over the whole path. `URI#normalize`, `URI#normalized_path`, `URI#==`, `URI#===` and `URI#join` all call it. Normalizing, comparing or joining a URI taken from user input can result in uncontrolled resource consumption, leading to denial of service. On 2.9.0, normalizing a 34 KB path takes about 3.5 seconds on MRI Ruby 4.0, and the cost grows with the square of the path length.

This affects every Ruby implementation, including MRI Ruby 3.2 and later. `URI.parse` by itself is unaffected, as is code that never normalizes, compares, or joins URIs from untrusted sources.

### Affected Versions

This vulnerability affects all versions of Addressable prior to 2.9.1. It is fixed in 2.9.1.

### Workarounds

- Limit the length of URIs taken from user input before calling `normalize`, `==` or `join` on them. Web servers often limit request lines to about 8 KB, which keeps the cost to about 150 milliseconds per call on typical hardware, but URIs from other sources (request bodies, headers such as `Location`, stored data) may not be limited.
- Reject paths with many dot segments before normalizing them.

### Credits

Reported by Matthew Mongeau (@halogenandtoast), Ruby Central Gem Security, who also suggested the single-pass approach used in the fix.

### 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_
