{"cve":"CVE-2022-24713","nvd":{"published":"2022-03-08T19:15:08.000","modified":"2026-06-17T04:32:21.120","status":"Modified","description":"regex is an implementation of regular expressions for the Rust language. The regex crate features built-in mitigations to prevent denial of service attacks caused by untrusted regexes, or untrusted input matched by trusted regexes. Those (tunable) mitigations already provide sane defaults to prevent attacks. This guarantee is documented and it's considered part of the crate's API. Unfortunately a bug was discovered in the mitigations designed to prevent untrusted regexes to take an arbitrary amount of time during parsing, and it's possible to craft regexes that bypass such mitigations. This makes it possible to perform denial of service attacks by sending specially crafted regexes to services accepting user-controlled, untrusted regexes. All versions of the regex crate before or equal to 1.5.4 are affected by this issue. The fix is include starting from regex 1.5.5. All users accepting user-controlled regexes are recommended to upgrade immediately to the latest version of the regex crate. Unfortunately there is no fixed set of problematic regexes, as there are practically infinite regexes that could be crafted to exploit this vulnerability. Because of this, it us not recommend to deny known problematic regexes.","cvss_v4":null,"cvss_v3":{"version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5},"cwes":["CWE-1333","CWE-400"],"references":["https://github.com/rust-lang/regex/commit/ae70b41d4f46641dbc45c7a4f87954aea356283e","https://github.com/rust-lang/regex/security/advisories/GHSA-m5pq-gvj9-9vr8","https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw","https://lists.debian.org/debian-lts-announce/2022/04/msg00003.html","https://lists.debian.org/debian-lts-announce/2022/04/msg00009.html"],"products":["debian:debian_linux","fedoraproject:fedora","rust-lang:regex"],"source":"nvd","synced_at":"2026-10-19T21:28:04.509275555+00:00"},"epss":{"cve":"CVE-2022-24713","score":0.1446,"percentile":0.96629,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-m5pq-gvj9-9vr8","url":"https://osv.dev/vulnerability/GHSA-m5pq-gvj9-9vr8","summary":"Rust's regex crate vulnerable to regular expression denial of service","modified":"2023-11-08T04:08:33.272453Z","packages":[{"ecosystem":"crates.io","name":"regex","purl":"pkg:cargo/regex","ranges":["<1.5.5"],"fixed":["1.5.5"]}]},{"id":"RUSTSEC-2022-0013","url":"https://osv.dev/vulnerability/RUSTSEC-2022-0013","summary":"Regexes with large repetitions on empty sub-expressions take a very long time to parse","modified":"2023-11-08T04:08:33.272453Z","packages":[{"ecosystem":"crates.io","name":"regex","purl":"pkg:cargo/regex","ranges":[">=0.0.0-0 <1.5.5"],"fixed":["1.5.5"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}