Vulnerability · Published Jul 6, 2021 · Assigned by GitHub_M

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

High 7.5

In plain English

A high-severity uncontrolled resource consumption in addressable from sporkmonger. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.1% (higher than 82% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)2.1%top 17.9% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20ruby-addressable2.8.0-r0ALPINE-CVE-2021-32740
Alpine:v3.21ruby-addressable2.8.0-r0ALPINE-CVE-2021-32740
Alpine:v3.22ruby-addressable2.8.0-r0ALPINE-CVE-2021-32740
Alpine:v3.23ruby-addressable2.8.0-r0ALPINE-CVE-2021-32740
Alpine:v3.24ruby-addressable2.8.0-r0ALPINE-CVE-2021-32740
Debian:12ruby-addressable2.7.0-2DEBIAN-CVE-2021-32740
Debian:13ruby-addressable2.7.0-2DEBIAN-CVE-2021-32740
Debian:14ruby-addressable2.7.0-2DEBIAN-CVE-2021-32740
RubyGemsaddressable2.8.0GHSA-jxhc-q857-3j6g

Affected products (as reported)

VendorProductVersions
sporkmonger addressable > 2.3.0, <= 2.7.0

Weakness: CWE-400 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References