CVE-2021-32740
Regular Expression Denial of Service in Addressable templates
Check your servers for CVE-2021-32740
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2021-32740 affects addressable, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library. An uncontrolled resource consumption vulnerability exists after version 2.3.0 through version 2.7.0. Within the URI template implementation in Addressable, a maliciously crafted template may result in uncontrolled resource consumption, leading to denial of service when matched against a URI. In typical usage, templates would not normally be read from untrusted user input, but nonetheless, no previous security advisory for Addressable has cautioned against doing this. Users of the parsing capabilities in Addressable but not the URI template capabilities are unaffected. The vulnerability is patched in version 2.8.0. As a workaround, only create Template objects from trusted sources that have been validated not to produce catastrophic backtracking.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- none: the attacker does not need an account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality none, integrity none, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 2.14%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 82.5% of all scored CVEs. Scores of 1 Dec 2026.
Weakness
- CWE-400 Uncontrolled Resource Consumption
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| addressable |
affected > 2.3.0, <= 2.7.0
|
Is my server affected?
Find the installed version of addressable and compare it with the fixed version of your distribution. Distributions often fix a CVE in a package version of their own, so the version number of the upstream project can mislead.
Debian, Ubuntu
dpkg -l | grep -i addressable
# packages whose changelog names the CVE (fixed in the installed version)
zgrep -l CVE-2021-32740 /usr/share/doc/*/changelog.Debian.gz
# Ubuntu
pro fix CVE-2021-32740RHEL, Rocky, Alma, Fedora
rpm -q addressable
# lists the advisory while the fix is not installed
dnf updateinfo list --cve CVE-2021-32740Alpine
apk list --installed | grep -i addressableWith Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2021-32740
trivy image --scanners vuln IMAGE | grep CVE-2021-32740
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Advisories
- https://github.com/sporkmonger/addressable/security/advisories/GHSA-jxhc-q857-3j6g github.com
- FEDORA-2021-5d14763df8 lists.fedoraproject.org · vendor advisory
- FEDORA-2021-e9fc035565 lists.fedoraproject.org · vendor advisory
Other references
- https://github.com/sporkmonger/addressable/commit/0d8a3127e35886ce9284810a7f2438bff6b43cbc github.com
Source: the record CVE-2021-32740 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse