VDB

CVE-2022-24713

CVE-2022-24713 PUBLISHED CVSS 7.5 HIGH

Regular expression denial of service in Rust's regex crate

Reported by github_m · Published March 8, 2022

regex is fixed in 1.5.5 (crates.io)

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
regexcrates.io1.5.5
swayrAlpine0.16.1-r0

Risk scores

CVSS 3.1
7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected products

VendorProductVersions
rust-langregex< 1.5.5
crates.ioregex0
alpineswayr0
archthunderbird91.7.0-1
rust-langregex0
amazon:2023amazon-efs-utils0
amazon:2amazon-efs-utils0
alpinebat0, 0
alpinefirefox-esr0
alpinefirefox0
alpinethunderbird0
amazon:2thunderbird0
alpinedelta0
archfirefox0
alpinelibrewolf0

Timeline

  • Mar 8, 2022 CVE Published
  • Mar 9, 2022 EPSS Score (30 in total, the first dated here)
  • Mar 22, 2022 PoC Published
  • Mar 17, 2026 Security Advisory (24 in total, the first dated here)
  • Jul 2, 2026 Coalition ESS Score
  • Oct 31, 2026 Distribution Patch (16 in total, the first dated here)

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2022-24713
vulnetix vdb fixes CVE-2022-24713

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-24713/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›