CVE-2021-32740
Ruby vulnerability analysis and mitigation

Overview

CVE-2021-32740 affects Addressable, an alternative implementation to the URI implementation in Ruby's standard library. The vulnerability was introduced in version 2.3.0 and affects versions through 2.7.0. A maliciously crafted template may result in uncontrolled resource consumption, leading to denial of service when matched against a URI (GitHub Advisory).

Technical details

The vulnerability is a Regular Expression Denial of Service (ReDoS) issue in the URI template implementation of Addressable. The CVSS v3.1 base score is 7.5 (HIGH) with vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H. The vulnerability is classified as CWE-400 (Uncontrolled Resource Consumption) (NVD, GitHub Advisory).

Impact

When exploited, this vulnerability can lead to denial of service through uncontrolled resource consumption. While in typical usage templates would not normally be read from untrusted user input, the vulnerability poses a risk when template objects are created from untrusted sources. Users of only the parsing capabilities in Addressable, but not the URI template capabilities, are unaffected (GitHub Advisory).

Mitigation and workarounds

The vulnerability is patched in version 2.8.0. As a workaround, users should only create Template objects from trusted sources that have been validated not to produce catastrophic backtracking. The fix includes addressing the ReDoS vulnerability in Addressable::Template#match (GitHub Commit, GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-66568CRITICAL9.3
  • RubyRuby
  • ruby-saml
NoYesDec 09, 2025
CVE-2025-66567CRITICAL9.3
  • RubyRuby
  • ruby-saml
NoYesDec 09, 2025
GHSA-4249-gjr8-jpq3HIGH8.7
  • RubyRuby
  • prosemirror_to_html
NoYesNov 13, 2025
CVE-2025-64501HIGH7.6
  • RubyRuby
  • prosemirror_to_html
NoYesNov 10, 2025
CVE-2025-61594MEDIUMN/A
  • RubyRuby
  • ruby-doc
NoYesDec 11, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management