CVE-2022-24713 | Regular expression denial of service in Rust's regex crate

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.

Published: 2022-03-08 Last update: 2024-11-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2022-24713 is rated Moderate Risk (62.1/100): CVSS High severity, with high exploitation likelihood (EPSS 10.40%, 93th percentile). Core evidence: EPSS ranks this CVE among the most likely to be exploited in the near term. Mandatory action: High exploitation likelihood—assess exposure and prioritize remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2022-24713

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-04-24 10.92% 10.40% -0.51%
2 2026-04-16 11.25% 10.92% -0.33%
3 2026-04-06 11.25%

Full EPSS history (72 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2022-24713

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 3.6 [email protected]
7.5 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:N)
Doesn’t really leak secrets in a meaningful way.
Integrity (I:N)
Data isn’t meaningfully altered or forged.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
3.9 3.6 [email protected]
5.0 2.0 MEDIUM
AV:N/AC:L/Au:N/C:N/I:N/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:L)
Exploitation conditions are straightforward and predictable.
Authentication (AU:N)
No authentication is required.
Confidentiality impact (C:N)
No confidentiality impact.
Integrity impact (I:N)
No integrity impact.
Availability impact (A:P)
Partial availability impact.
10.0 2.9 [email protected]

Weakness enumeration for CVE-2022-24713

GitHub Security Advisory for CVE-2022-24713

GHSA-m5pq-gvj9-9vr8 · Severity: high · Ecosystem: rust — Rust's regex crate vulnerable to regular expression denial of service

OS Trackers for CVE-2022-24713

vendor priority summary link
alpine high CVE-2022-24713: 7 source package rows (bat, delta, …); 45 state rows across 7 repos (3.17-community, 3.18-community, 3.19-community, 3.20-community, 3.21-community, 3.22-community, edge-community); fixed 45, open 0. https://security.alpinelinux.org/vuln/CVE-2022-24713
debian not yet assigned CVE-2022-24713 not yet assigned priority: Debian including 4 source packages (firefox, firefox-esr, rust-regex, thunderbird), 16 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 15, open 1. https://security-tracker.debian.org/tracker/CVE-2022-24713
gentoo high CVE-2022-24713: 2 GLSA(s) (202208-08, 202208-14), 4 atom(s) (mail-client/thunderbird, mail-client/thunderbird-bin, www-client/firefox, www-client/firefox-bin); latest impact high. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2022-24713
redhat low https://access.redhat.com/security/cve/CVE-2022-24713
suse medium CVE-2022-24713 severity moderate: SUSE including 407 source package names (MozillaFirefox, MozillaFirefox-140.2.0-160000.1.2, …), 873 product×package rows across 135 product lines (Container suse/kiosk/firefox-esr, HPE Helion OpenStack 8, … (135 product lines)): Fixed 370, Known Not Affected 272, Known Affected 231. https://www.suse.com/security/cve/CVE-2022-24713/
ubuntu medium CVE-2022-24713 medium priority: Ubuntu including 3 source packages (firefox, rust-regex, thunderbird), 24 status rows across 9 suites (bionic, focal, impish, jammy, kinetic, lunar, trusty, upstream, xenial): released 14, ignored 6, not-affected 4. https://ubuntu.com/security/CVE-2022-24713

Affected software / configurations for CVE-2022-24713

Vendor Product Version Raw CPE
rust-lang regex < 1.5.5 cpe:2.3:a:rust-lang:regex:*:*:*:*:*:rust:*:*
fedoraproject fedora 34 cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*
fedoraproject fedora 35 cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*
fedoraproject fedora 36 cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
debian debian_linux 11.0 cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*

References for CVE-2022-24713

URL Tags
https://github.com/rust-lang/regex/commit/ae70b41d4f46641dbc45c7a4f87954aea356283e Patch Third Party Advisory
https://github.com/rust-lang/regex/security/advisories/GHSA-m5pq-gvj9-9vr8 Third Party Advisory
https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/04/msg00003.html Mailing List Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/04/msg00009.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JANLZ3JXWJR7FSHE57K66UIZUIJZI67T/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/O3YB7CURSG64CIPCDPNMGPE4UU24AB6H/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PDOWTHNVGBOP2HN27PUFIGRYNSNDTYRJ/
https://security.gentoo.org/glsa/202208-08 Third Party Advisory
https://security.gentoo.org/glsa/202208-14 Third Party Advisory
https://www.debian.org/security/2022/dsa-5113 Third Party Advisory
https://www.debian.org/security/2022/dsa-5118 Third Party Advisory
cvelogic Threat Intelligence