VDB

CVE-2021-32740

CVE-2021-32740 PUBLISHED CVSS 7.5 HIGH

Regular Expression Denial of Service in Addressable templates

Reported by github_m · Published July 6, 2021

addressable is fixed in 2.8.0 (RubyGems)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
addressableRubyGems2.8.0
ruby-addressableAlpine2.8.0-r0
ruby-addressableArch Linux2.8.0-1
addressableaddressable_project2.8.0

Risk scores

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

Affected products

VendorProductVersions
sporkmongeraddressable> 2.3.0, <= 2.7.0
alpineruby-addressable0
RubyGemsaddressable2.3.0
archruby-addressable0
sporkmongeraddressable> 2.3.0, <= 2.7.0

Timeline

  • Jul 6, 2021 CVE Published
  • Jul 6, 2021 PoC Published (8 in total, the first dated here)
  • Jul 7, 2021 EPSS Score (30 in total, the first dated here)
  • Apr 6, 2026 CVE Updated
  • Jun 1, 2026 Security Advisory (2 in total, the first dated here)
  • Aug 1, 2026 Coalition ESS Score
  • Oct 13, 2026 Distribution Patch

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-32740
vulnetix vdb fixes CVE-2021-32740

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-32740/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›