Vulnerability DatabaseRUSTSEC-2022-0013

RUSTSEC-2022-0013
Rust vulnerability analysis and mitigation

Overview

The regex crate for Rust contained a vulnerability (CVE-2022-24713) where built-in mitigations designed to prevent denial of service attacks from untrusted regexes could be bypassed. The vulnerability affected all versions of the regex crate up to and including version 1.5.4, with the fix being introduced in version 1.5.5. The issue specifically impacted services that accept user-controlled, untrusted regular expressions (Rust Security).

Technical details

The vulnerability stems from a bug in the regex crate's built-in mitigations that were intended to prevent untrusted regexes from taking arbitrary amounts of time during parsing. The security measures, which were documented and considered part of the crate's API, could be circumvented by specially crafted regular expressions. This bypass allowed for the creation of regexes that could evade the complexity limitations put in place by the crate (Rust Security).

Impact

The primary impact of this vulnerability is the potential for denial of service attacks when services accept user-controlled, untrusted regular expressions. The severity of this vulnerability is rated as 'high' specifically when the regex crate is used to parse untrusted regexes. It's important to note that using the crate to parse untrusted input with trusted regexes is not affected by this vulnerability (Rust Security).

Mitigation and workarounds

The primary mitigation is to upgrade to regex version 1.5.5 or later, which contains the fix for this vulnerability. Due to the infinite possibilities of problematic regexes, blocking known problematic patterns is not recommended as an effective mitigation strategy (Rust Security).

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
  • rust-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