CVE-2022-24713
Rust vulnerability analysis and mitigation

Overview

CVE-2022-24713 is a high-severity vulnerability discovered in the Rust regex crate that affects versions 1.5.4 and earlier. The vulnerability was disclosed on March 8, 2022, and involves improper complexity limiting of regular expressions during parsing. This vulnerability affects applications that accept untrusted regular expressions for parsing (Rust Blog).

Technical details

The regex crate contained a bug in its built-in mitigations designed to prevent untrusted regexes from taking an arbitrary amount of time during parsing. The vulnerability specifically relates to empty sub-expressions, which don't use memory in the implementation and thus bypass the pre-existing size limit machinery. This made it possible for attackers to craft regexes that would take an excessive amount of CPU time to compile (GitHub Advisory).

Impact

When the regex crate is used to parse untrusted regular expressions, an attacker could perform denial of service attacks by sending specially crafted regexes to services accepting user-controlled, untrusted regexes. The vulnerability does not affect cases where trusted regexes are used to parse untrusted input (Rust Blog).

Mitigation and workarounds

The vulnerability was fixed in regex version 1.5.5. The fix involves adding a fake amount of memory usage for empty sub-expressions to ensure they trigger the size limit restrictions. It is recommended that all users accepting user-controlled regexes upgrade immediately to the latest version of the regex crate. Blocking known problematic regexes is not recommended as a mitigation strategy due to the infinite variety of possible exploit patterns (GitHub Advisory).

Additional resources


SourceThis report was generated using AI

Related Rust vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-65807HIGH8.4
  • RustRust
  • sd
NoNoDec 10, 2025
CVE-2025-66627HIGH7.8
  • RustRust
  • wasmi
NoYesDec 09, 2025
CVE-2025-67487MEDIUM5.5
  • RustRust
  • static-web-server
NoYesDec 09, 2025
CVE-2025-66622LOW1.3
  • RustRust
  • matrix-sdk-base
NoYesDec 09, 2025
RUSTSEC-2025-0135N/AN/A
  • RustRust
  • matrix-sdk-base
NoYesDec 08, 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