{"id":"CVE-2022-24713","published":"2022-03-08T19:00:12Z","modified":"2025-04-23T18:58:21Z","title":"Regular expression denial of service in Rust's regex crate","vendor":"rust-lang","product":"regex","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.1446,"percentile":0.96712,"provenance":"source"},"cwes":[{"id":"CWE-400","name":"Uncontrolled Resource Consumption"}],"references":[{"url":"https://github.com/rust-lang/regex/security/advisories/GHSA-m5pq-gvj9-9vr8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/rust-lang/regex/commit/ae70b41d4f46641dbc45c7a4f87954aea356283e","tags":["x_refsource_MISC"]},{"url":"https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw","tags":["x_refsource_MISC"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PDOWTHNVGBOP2HN27PUFIGRYNSNDTYRJ/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JANLZ3JXWJR7FSHE57K66UIZUIJZI67T/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O3YB7CURSG64CIPCDPNMGPE4UU24AB6H/","tags":["vendor-advisory","x_refsource_FEDORA"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/04/msg00003.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://www.debian.org/security/2022/dsa-5113","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/04/msg00009.html","tags":["mailing-list","x_refsource_MLIST"]},{"url":"https://www.debian.org/security/2022/dsa-5118","tags":["vendor-advisory","x_refsource_DEBIAN"]},{"url":"https://security.gentoo.org/glsa/202208-08","tags":["vendor-advisory","x_refsource_GENTOO"]},{"url":"https://security.gentoo.org/glsa/202208-14","tags":["vendor-advisory","x_refsource_GENTOO"]}],"priority":{"score":29.6,"factors":[{"name":"EPSS percentile","points":19.34},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.25}]},"exploitSources":{"pocGithub":{"count":2,"skipped":0,"earliest":"2022-06-05","earliestUrl":"https://github.com/jpeisach/CVE-2022-24713-POC","repos":[{"name":"jpeisach/CVE-2022-24713-POC","url":"https://github.com/jpeisach/CVE-2022-24713-POC","stars":0,"created":"2022-06-05"},{"name":"federiconbaez/cortex9-rust-regex-empty-repetition-size-limit-model","url":"https://github.com/federiconbaez/cortex9-rust-regex-empty-repetition-size-limit-model","stars":0,"created":"2026-11-06"}]},"first":{"date":"2022-06-05","source":"PoC-in-GitHub","url":"https://github.com/jpeisach/CVE-2022-24713-POC"},"provenance":"source"},"vendorSlug":"rust-lang","affectedVersions":[{"vendor":"rust-lang","product":"regex","versions":["< 1.5.5"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2025-04-23T15:56:58.280846Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"crates.io","package":"regex","vulnerableRanges":["<1.5.5",">=0.0.0-0, <1.5.5"],"patched":["1.5.5"],"from":["GHSA-m5pq-gvj9-9vr8","RUSTSEC-2022-0013"],"provenance":"source"}],"summary":{"text":"The regex crate for Rust (rust-lang's regex library, versions up to and including 1.5.4) contains a flaw in the parsing-time mitigations meant to stop untrusted regular expressions from consuming unbounded time, which crafted patterns can bypass. An attacker who can submit regular expressions to a service that accepts user-controlled regexes can cause denial of service over the network, with no authentication or user interaction required and only the default configuration needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:36:42Z"},"euvd":{"id":"EUVD-2022-1468","exploited":false,"provenance":"source"}}