CVE-2022-24713Regular 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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 22.04 | firefox | Fixed | 1:1snap1-0ubuntu1 | UBUNTU-CVE-2022-24713 |
| Ubuntu 22.04 | rust-regex | Fixed | 1.5.4-1ubuntu0.1 | UBUNTU-CVE-2022-24713 |
| Ubuntu 22.04 | thunderbird | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | firefox | Fixed | 99.0+build2-0ubuntu0.20.04.2 | UBUNTU-CVE-2022-24713 |
| Ubuntu 20.04 | rust-regex | Fixed | 1.2.1-3ubuntu0.1 | UBUNTU-CVE-2022-24713 |
| Ubuntu 20.04 | thunderbird | Fixed | 1:91.8.1+build1-0ubuntu0.20.04.1 | UBUNTU-CVE-2022-24713 |
| Ubuntu 18.04 | firefox | Fixed | 99.0+build2-0ubuntu0.18.04.2 | UBUNTU-CVE-2022-24713 |
| Ubuntu 18.04 | thunderbird | Fixed | 1:91.8.1+build1-0ubuntu0.18.04.1 | UBUNTU-CVE-2022-24713 |
| Ubuntu 16.04 | firefox | Fix pending | ||
| Ubuntu 14.04 | firefox | Fix pending | ||
| Debian 14 | firefox-esr | Fixed | 91.8.0esr-1 | DEBIAN-CVE-2022-24713 |
| Debian 14 | rust-regex | Fixed | 1.5.5-1 | DEBIAN-CVE-2022-24713 |
| Debian 14 | thunderbird | Fixed | 1:91.8.0-1 | DEBIAN-CVE-2022-24713 |
| Debian 13 | firefox-esr | Fixed | 91.8.0esr-1 | DEBIAN-CVE-2022-24713 |
| Debian 13 | rust-regex | Fixed | 1.5.5-1 | DEBIAN-CVE-2022-24713 |
| Debian 13 | thunderbird | Fixed | 1:91.8.0-1 | DEBIAN-CVE-2022-24713 |
| Debian 12 | firefox-esr | Fixed | 91.8.0esr-1 | DEBIAN-CVE-2022-24713 |
| Debian 12 | rust-regex | Fixed | 1.5.5-1 | DEBIAN-CVE-2022-24713 |
| Debian 12 | thunderbird | Fixed | 1:91.8.0-1 | DEBIAN-CVE-2022-24713 |
| Red Hat Enterprise Linux 9 | firefox | Not affected | ||
| Red Hat Enterprise Linux 9 | firefox-x11 | Not affected | ||
| Red Hat Enterprise Linux 9 | thunderbird | Not affected | ||
| Red Hat Enterprise Linux 8 | firefox | Fixed | 0:91.8.0-1.el8_5 | RHSA-2022:1287 |
| Red Hat Enterprise Linux 8 | thunderbird | Fixed | 0:91.8.0-1.el8_5 | RHSA-2022:1301 |
| Red Hat Enterprise Linux 7 | firefox | Fixed | 0:91.8.0-1.el7_9 | RHSA-2022:1284 |
| Red Hat Enterprise Linux 7 | thunderbird | Fixed | 0:91.8.0-1.el7_9 | RHSA-2022:1302 |
| Red Hat Enterprise Linux 6 | firefox | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | thunderbird | Will not fix Out of support scope | ||
| AlmaLinux 8 | firefox | Fixed | 91.8.0-1.el8_5.alma | ALSA-2022:1287 |
| AlmaLinux 8 | thunderbird | Fixed | 91.8.0-1.el8_5.alma | ALSA-2022:1301 |
| Rocky Linux 8 | firefox | Fixed | 0:91.8.0-1.el8_5 | RLSA-2022:1287 |
| Rocky Linux 8 | thunderbird | Fixed | 0:91.8.0-1.el8_5 | RLSA-2022:1301 |
| Alpine Linux 3.24 | bat | Fixed | 0.21.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.24 | delta | Fixed | 0.13.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.24 | librewolf | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.24 | swayr | Fixed | 0.16.1-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.23 | bat | Fixed | 0.21.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.23 | delta | Fixed | 0.13.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.23 | firefox | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.23 | firefox-esr | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.23 | librewolf | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.23 | swayr | Fixed | 0.16.1-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.23 | thunderbird | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.22 | bat | Fixed | 0.21.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.22 | delta | Fixed | 0.13.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.22 | firefox | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.22 | firefox-esr | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.22 | librewolf | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.22 | swayr | Fixed | 0.16.1-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.22 | thunderbird | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.21 | bat | Fixed | 0.21.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.21 | delta | Fixed | 0.13.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.21 | firefox | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.21 | firefox-esr | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.21 | librewolf | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.21 | swayr | Fixed | 0.16.1-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.21 | thunderbird | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.20 | bat | Fixed | 0.21.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.20 | delta | Fixed | 0.13.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.20 | firefox | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.20 | firefox-esr | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.20 | swayr | Fixed | 0.16.1-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.20 | thunderbird | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.19 | bat | Fixed | 0.21.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.19 | delta | Fixed | 0.13.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.19 | firefox | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.19 | firefox-esr | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.19 | swayr | Fixed | 0.16.1-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.19 | thunderbird | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.18 | bat | Fixed | 0.21.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.18 | delta | Fixed | 0.13.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.18 | firefox | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.18 | firefox-esr | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.18 | swayr | Fixed | 0.16.1-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.18 | thunderbird | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.17 | bat | Fixed | 0.21.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.17 | delta | Fixed | 0.13.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.17 | firefox | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.17 | firefox-esr | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.17 | swayr | Fixed | 0.16.1-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.17 | thunderbird | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.16 | bat | Fixed | 0.21.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.16 | delta | Fixed | 0.13.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.16 | firefox | Fixed | 99.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.16 | firefox-esr | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.16 | swayr | Fixed | 0.16.1-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.16 | thunderbird | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.15 | bat | Fixed | 0.18.3-r2 | ALPINE-CVE-2022-24713 |
| Alpine Linux 3.15 | firefox-esr | Fixed | 91.8.0-r0 | ALPINE-CVE-2022-24713 |
| crates.io library | regex | Fixed | 1.5.5 | RUSTSEC-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.
- rust-lang regex: affected: < 1.5.5
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://www.debian.org/security/2022/dsa-5113 (vendor-advisory)
- https://www.debian.org/security/2022/dsa-5118 (vendor-advisory)
- https://security.gentoo.org/glsa/202208-08 (vendor-advisory)
References
- https://github.com/rust-lang/regex/security/advisories/GHSA-m5pq-gvj9-9vr8
- https://github.com/rust-lang/regex/commit/ae70b41d4f46641dbc45c7a4f87954aea356283e
- https://groups.google.com/g/rustlang-security-announcements/c/NcNNL1Jq7Yw
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PDOWTHNVGBOP2HN27PUFIGRYNSNDTYRJ/
- 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.debian.org/debian-lts-announce/2022/04/msg00003.html
- https://www.debian.org/security/2022/dsa-5113
- https://lists.debian.org/debian-lts-announce/2022/04/msg00009.html
- https://www.debian.org/security/2022/dsa-5118
- https://security.gentoo.org/glsa/202208-08
- https://security.gentoo.org/glsa/202208-14
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.