CVEfocus › CVE database › CVE-2022-24713

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

CVSS 7.5 HighEPSS 12.5% (higher than 97% of CVEs)Published 2022-03-08Updated 2025-04-23Assigner: GitHub_M

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.

CWE-400

What to do

Likely to be exploited: EPSS gives a 12% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.

Fixed builds are available from AlmaLinux, Alpine, Debian, Red Hat, Rocky Linux, Ubuntu, crates.io: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

82Fixed
2Fix pending
2Will not fix
4Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 22.04firefoxFixed1:1snap1-0ubuntu1UBUNTU-CVE-2022-24713
Ubuntu 22.04rust-regexFixed1.5.4-1ubuntu0.1UBUNTU-CVE-2022-24713
Ubuntu 22.04thunderbirdNot affected
vulnerable_code_not_present
Ubuntu 20.04firefoxFixed99.0+build2-0ubuntu0.20.04.2UBUNTU-CVE-2022-24713
Ubuntu 20.04rust-regexFixed1.2.1-3ubuntu0.1UBUNTU-CVE-2022-24713
Ubuntu 20.04thunderbirdFixed1:91.8.1+build1-0ubuntu0.20.04.1UBUNTU-CVE-2022-24713
Ubuntu 18.04firefoxFixed99.0+build2-0ubuntu0.18.04.2UBUNTU-CVE-2022-24713
Ubuntu 18.04thunderbirdFixed1:91.8.1+build1-0ubuntu0.18.04.1UBUNTU-CVE-2022-24713
Ubuntu 16.04firefoxFix pending
Ubuntu 14.04firefoxFix pending
Debian 14firefox-esrFixed91.8.0esr-1DEBIAN-CVE-2022-24713
Debian 14rust-regexFixed1.5.5-1DEBIAN-CVE-2022-24713
Debian 14thunderbirdFixed1:91.8.0-1DEBIAN-CVE-2022-24713
Debian 13firefox-esrFixed91.8.0esr-1DEBIAN-CVE-2022-24713
Debian 13rust-regexFixed1.5.5-1DEBIAN-CVE-2022-24713
Debian 13thunderbirdFixed1:91.8.0-1DEBIAN-CVE-2022-24713
Debian 12firefox-esrFixed91.8.0esr-1DEBIAN-CVE-2022-24713
Debian 12rust-regexFixed1.5.5-1DEBIAN-CVE-2022-24713
Debian 12thunderbirdFixed1:91.8.0-1DEBIAN-CVE-2022-24713
Red Hat Enterprise Linux 9firefoxNot affected
Red Hat Enterprise Linux 9firefox-x11Not affected
Red Hat Enterprise Linux 9thunderbirdNot affected
Red Hat Enterprise Linux 8firefoxFixed0:91.8.0-1.el8_5RHSA-2022:1287
Red Hat Enterprise Linux 8thunderbirdFixed0:91.8.0-1.el8_5RHSA-2022:1301
Red Hat Enterprise Linux 7firefoxFixed0:91.8.0-1.el7_9RHSA-2022:1284
Red Hat Enterprise Linux 7thunderbirdFixed0:91.8.0-1.el7_9RHSA-2022:1302
Red Hat Enterprise Linux 6firefoxWill not fix
Out of support scope
Red Hat Enterprise Linux 6thunderbirdWill not fix
Out of support scope
AlmaLinux 8firefoxFixed91.8.0-1.el8_5.almaALSA-2022:1287
AlmaLinux 8thunderbirdFixed91.8.0-1.el8_5.almaALSA-2022:1301
Rocky Linux 8firefoxFixed0:91.8.0-1.el8_5RLSA-2022:1287
Rocky Linux 8thunderbirdFixed0:91.8.0-1.el8_5RLSA-2022:1301
Alpine Linux 3.24batFixed0.21.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.24deltaFixed0.13.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.24librewolfFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.24swayrFixed0.16.1-r0ALPINE-CVE-2022-24713
Alpine Linux 3.23batFixed0.21.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.23deltaFixed0.13.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.23firefoxFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.23firefox-esrFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.23librewolfFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.23swayrFixed0.16.1-r0ALPINE-CVE-2022-24713
Alpine Linux 3.23thunderbirdFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.22batFixed0.21.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.22deltaFixed0.13.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.22firefoxFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.22firefox-esrFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.22librewolfFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.22swayrFixed0.16.1-r0ALPINE-CVE-2022-24713
Alpine Linux 3.22thunderbirdFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.21batFixed0.21.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.21deltaFixed0.13.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.21firefoxFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.21firefox-esrFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.21librewolfFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.21swayrFixed0.16.1-r0ALPINE-CVE-2022-24713
Alpine Linux 3.21thunderbirdFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.20batFixed0.21.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.20deltaFixed0.13.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.20firefoxFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.20firefox-esrFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.20swayrFixed0.16.1-r0ALPINE-CVE-2022-24713
Alpine Linux 3.20thunderbirdFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.19batFixed0.21.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.19deltaFixed0.13.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.19firefoxFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.19firefox-esrFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.19swayrFixed0.16.1-r0ALPINE-CVE-2022-24713
Alpine Linux 3.19thunderbirdFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.18batFixed0.21.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.18deltaFixed0.13.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.18firefoxFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.18firefox-esrFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.18swayrFixed0.16.1-r0ALPINE-CVE-2022-24713
Alpine Linux 3.18thunderbirdFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.17batFixed0.21.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.17deltaFixed0.13.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.17firefoxFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.17firefox-esrFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.17swayrFixed0.16.1-r0ALPINE-CVE-2022-24713
Alpine Linux 3.17thunderbirdFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.16batFixed0.21.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.16deltaFixed0.13.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.16firefoxFixed99.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.16firefox-esrFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.16swayrFixed0.16.1-r0ALPINE-CVE-2022-24713
Alpine Linux 3.16thunderbirdFixed91.8.0-r0ALPINE-CVE-2022-24713
Alpine Linux 3.15batFixed0.18.3-r2ALPINE-CVE-2022-24713
Alpine Linux 3.15firefox-esrFixed91.8.0-r0ALPINE-CVE-2022-24713
crates.io libraryregexFixed1.5.5RUSTSEC-2022-0013

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.