RubyGems
CVE-2026-141524
Addressable::Template#match and #extract take variable names from the URI, so a URI can add or reassign variables
- Severity
- Low 3.7
- Published
- 1 Dec 2026
- Last changed
- 1 Dec 2026
- Added to UpHeron
- 1 Dec 2026
- Fixed in
- 2.10.0
- Attack
- Over the network · Only under certain conditions · No login needed · No user action needed
- Attacker can
- Change some data
- CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N- Also known as
- GHSA-q5vw-6v74-fg2g
- Sources
- OSV.dev and GitHub
Description
Addressable::Template#match and #extract take the name of a variable in a ;, ? or & expression from the URI, not from the template, when the variable isn't exploded. The template /search{?q} matches /search?admin=true and gives {"q" => nil, "admin" => "true"}: the mapping has a variable the template doesn't have, and q is missing its value. The URI can also give its value to another of the template's variables, which takes the first value it's given. /files{;version}/{id} matches /files;id=secret/42 and gives id the value "secret", not the 42 in its place in the path.
A URI Template can only expand such a variable to its own name followed by = (Sections 3.2.7 to 3.2.9 of RFC 6570), and matching assigns the parts of a URI "to the named variables" (Section 1.4). So these URIs aren't expansions of the template, and the mappings name variables that the URI's text doesn't give them.
Workarounds
- After matching, keep only the template's variables, and accept the URI only if they expand back to it. This rejects every URI above. It also rejects some that differ only in how they're written, such as a query with the names in a different order.
- Check a processor's restrictions on a variable's value in restore, not only in match.
- Don't act on values in a processor's restore, such as by recording them. Act on the mapping after it passes the check above.
Affected software
| Software | Affected versions |
|---|---|
addressableRubyGems · osv:RubyGems:addressable |
|
About addressable
- Total downloads (RubyGems)
- 1,323,514,580RubyGems, 1 Dec 2026
Vulnerabilities in addressable
- In our list
- 20
- Published in the last 12 months
- 20
- Critical, last 12 months
- 0
- High, last 12 months
- 0
- Known exploited
- 0
- CVE-2026-141532Addressable URI#origin= takes the host from the userinfoLow 3.7 2 Dec 2026
- CVE-2026-141536Addressable URI#request_uri returns control characters unencoded with possible HTTP request splittingLow 3.7 1 Dec 2026
- CVE-2026-141535Addressable URI#hostname strips brackets from hosts that aren't IP literalsLow 3.7 1 Dec 2026
- CVE-2026-141537Addressable URI normalization takes quadratic time on long runs of combining marksLow 3.7 1 Dec 2026
- CVE-2026-141538Addressable URI userinfo setters store delimiters raw, so the serialized URI names a different hostMedium 4.8 1 Dec 2026
- CVE-2026-141539Addressable native IDNA backend truncates a host at a pct-encoded NUL when normalizingMedium 4.8 1 Dec 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-141524
- GitHub Advisory Database https://github.com/advisories/GHSA-q5vw-6v74-fg2g