CVEfocus › CVE database › CVE-2021-32740

CVE-2021-32740Regular Expression Denial of Service in Addressable templates

CVSS 7.5 HighEPSS 2.1% (higher than 83% of CVEs)Published 2021-07-06Updated 2024-08-03Assigner: GitHub_M

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.

CWE-400

What to do

Fixed builds are available from Alpine, Debian, RubyGems: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

14Fixed
4Fix pending
1Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 25.10ruby-addressableNot affected
vulnerable_code_not_present
Ubuntu 20.04ruby-addressableFix pendingUBUNTU-CVE-2021-32740
Ubuntu 18.04ruby-addressableFix pendingUBUNTU-CVE-2021-32740
Ubuntu 16.04ruby-addressableFix pendingUBUNTU-CVE-2021-32740
Ubuntu 14.04ruby-addressableFix pending
Debian 14ruby-addressableFixed2.7.0-2DEBIAN-CVE-2021-32740
Debian 13ruby-addressableFixed2.7.0-2DEBIAN-CVE-2021-32740
Debian 12ruby-addressableFixed2.7.0-2DEBIAN-CVE-2021-32740
Alpine Linux 3.24ruby-addressableFixed2.8.0-r0ALPINE-CVE-2021-32740
Alpine Linux 3.23ruby-addressableFixed2.8.0-r0ALPINE-CVE-2021-32740
Alpine Linux 3.22ruby-addressableFixed2.8.0-r0ALPINE-CVE-2021-32740
Alpine Linux 3.21ruby-addressableFixed2.8.0-r0ALPINE-CVE-2021-32740
Alpine Linux 3.20ruby-addressableFixed2.8.0-r0ALPINE-CVE-2021-32740
Alpine Linux 3.19ruby-addressableFixed2.8.0-r0ALPINE-CVE-2021-32740
Alpine Linux 3.18ruby-addressableFixed2.8.0-r0ALPINE-CVE-2021-32740
Alpine Linux 3.17ruby-addressableFixed2.8.0-r0ALPINE-CVE-2021-32740
Alpine Linux 3.16ruby-addressableFixed2.8.0-r0ALPINE-CVE-2021-32740
Alpine Linux 3.15ruby-addressableFixed2.8.0-r0ALPINE-CVE-2021-32740
RubyGems libraryaddressableFixed2.8.0GHSA-jxhc-q857-3j6g

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.