CVE-2026-141524: Addressable :Template#match And #extract Take Variable Vulnerability
LOWCVE-2026-141524 is a LOW (CVSS 3.7) :template#match and #extract take variable vulnerability (CWE-20: Improper Input Validation) affecting Addressable libraries in the RubyGems ecosystem. The issue involves :template#match and #extract take variable names from the uri, so a uri can add or reassign variables. Remediation is available by upgrading affected packages to version 2.10.0.
CVE-2026-141524 at a Glance
Security Impact
CVSS: 3.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2026-141524
To remediate this vulnerability, upgrade all affected Addressable dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade addressable to 2.10.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for addressable
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-141524, inspect your project dependencies for Addressable:
inspect dependencies for addressable
Analyze the terminal output to locate any version of Addressable in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.10.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Addressable, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-141524 Affected Addressable Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
addressable
|
RubyGems |
≥ 2.3.0
< 2.10.0
|
2.10.0
|
References
Frequently Asked Questions
What is CVE-2026-141524?
Which Addressable versions are affected?
What version fixes CVE-2026-141524?
Is addressable affected?
What is the CVSS score of CVE-2026-141524?
What CWE is associated with CVE-2026-141524?
How can I check RubyGems dependencies for CVE-2026-141524?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q5vw-6v74-fg2g",
"modified" : "2026-12-01T23:36:55Z",
"published" : "2026-12-01T23:36:55Z",
"aliases" : [ "CVE-2026-141524" ],
"summary" : "Addressable::Template#match and #extract take variable names from the URI, so a URI can add or reassign variables",
"details" : "### Impact\n\n`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.\n\nA 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.\n\nAn application is affected if it matches an untrusted URI against a template with an unexploded `;`, `?` or `&` expression, and does one of these:\n\n- uses the mapping's names as a list of the parameters it accepts, for example by passing the whole mapping on to set attributes or to build a database query;\n- trusts that a variable's value comes from where the template puts it, as with a `;` expression before a path variable;\n- uses a processor whose `restore` acts on a value by its name, such as recording an identifier. `restore` is called with the name the URI gives, so a query parameter can make `restore` act again for a variable the template takes from the path. The processor then records the query's value, while the mapping keeps the path's;\n- relies on a processor's `match` pattern to restrict the value of such a variable. Another expression's variable can take the text and give it the restricted variable's name, so the pattern isn't applied.\n\nExploded variables, such as `{?q*}`, aren't affected: the names they take from the URI are kept inside the variable's value. Templates without `;`, `?` or `&` expressions aren't affected, and neither is `#expand`.\n\n### Affected Versions\n\nThis vulnerability affects Addressable >= 2.3.0, the first version with RFC 6570 templates. Before 2.3.6, a URI can only add variables to the mapping, which then leaves out the variable whose value the URI took; giving a value to another of the template's variables, and the processor case, start with 2.3.6. It is fixed in 2.10.0, where an unexploded `;`, `?` or `&` expression only matches its own variables' names, so these URIs don't match. A processor's `match` pattern for such a variable then matches only its value, as documented, not the name and `=` as well, and `restore` is only called with the template's names.\n\n### Workarounds\n\n- 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.\n- Check a processor's restrictions on a variable's value in `restore`, not only in `match`.\n- 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.\n\n### Proof of Concept\n\n```ruby\nrequire \"addressable/template\"\n\nsearch = Addressable::Template.new(\"/search{?q}\")\np search.extract(\"/search?admin=true\")\n\nfiles = Addressable::Template.new(\"/files{;version}/{id}\")\np files.extract(\"/files;id=secret/42\")\n\n# Workaround: keep only the template's variables, and accept the URI only\n# if they expand back to it.\ndef extract_strictly(template, uri)\n mapping = template.extract(uri)\n return nil unless mapping\n mapping = mapping.select { |name, _| template.variables.include?(name) }\n template.expand(mapping).to_s == uri ? mapping : nil\nend\np extract_strictly(search, \"/search?admin=true\")\np extract_strictly(files, \"/files;id=secret/42\")\np extract_strictly(files, \"/files;version=2/42\")\n```\n\nAffected versions print:\n\n```\n{\"q\" => nil, \"admin\" => \"true\"}\n{\"version\" => nil, \"id\" => \"secret\"}\nnil\nnil\n{\"version\" => \"2\", \"id\" => \"42\"}\n```\n\nFixed versions print:\n\n```\nnil\nnil\nnil\nnil\n{\"version\" => \"2\", \"id\" => \"42\"}\n```\n\n### Credits\n\nFound by Bob Aman (@sporkmonger).\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)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "RubyGems",
"name" : "addressable"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.3.0"
}, {
"fixed" : "2.10.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.9.2"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/sporkmonger/addressable/security/advisories/GHSA-q5vw-6v74-fg2g"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-141524"
}, {
"type" : "WEB",
"url" : "https://github.com/sporkmonger/addressable/commit/de9e4048f65b2fed2ed6a0b020f41dad77fe53f5"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/sporkmonger/addressable"
}, {
"type" : "WEB",
"url" : "https://github.com/sporkmonger/addressable/releases/tag/addressable-2.10.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20", "CWE-915" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2026-12-01T23:36:55Z",
"nvd_published_at" : "2026-12-01T21:17:11Z"
}
}