CVE-2022-24713
Published: 08 March 2022
Summary
CVE-2022-24713 is a high-severity Uncontrolled Resource Consumption (CWE-400) vulnerability in Fedoraproject Fedora. Its CVSS base score is 7.5 (High).
Operationally, ranked in the top 6.6% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.
Deeper analysis
The vulnerability is a flaw in the built-in denial-of-service mitigations of the regex crate for the Rust programming language. Specifically, certain crafted regular expressions can bypass limits intended to bound parsing time, allowing an untrusted pattern to consume excessive CPU during compilation. All versions up to and including 1.5.4 are affected; the issue was corrected in 1.5.5.
An attacker who can supply an arbitrary regex to an application or service that accepts untrusted patterns can trigger prolonged parsing and thereby cause a denial of service. The attack requires no authentication or user interaction and can be performed over the network, corresponding to the CVSS vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H and the associated CWEs 400 and 1333.
Public advisories and the accompanying patch notes recommend immediate upgrade to regex 1.5.5 or later for any code paths that accept user-controlled patterns. Because the set of exploitable expressions is effectively unbounded, the maintainers explicitly advise against attempting to maintain a block-list of known-bad patterns.
The EPSS score reached a peak of 0.1125 and currently stands at 0.1040, indicating moderate and relatively stable public exploitation interest after disclosure.
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2022-1468
Vulnerability details
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…
more
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(s)
Related Threats
No named actor attribution yet. ATT&CK technique mapping in progress for this CVE.
Affected Assets
Mitigating Controls
Likely Mitigating Controls AI
Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.
Limiting concurrent sessions directly prevents uncontrolled resource consumption by capping the number of active sessions per user or account.
Analysis identifies uncontrolled resource consumption indicative of denial-of-service or abuse attempts.
Contingency plan testing includes resource exhaustion scenarios to verify recovery, making it harder for attackers to sustain exploits that cause uncontrolled consumption.
Updated contingency plans include current procedures to detect, contain, and recover from resource exhaustion, limiting an attacker's ability to sustain impact from uncontrolled consumption.
Alternate site allows resumption of operations if resource exhaustion at the primary site is exploited to cause unavailability.
Alternate telecommunications services enable resumption of essential functions when primary services become unavailable due to uncontrolled resource consumption.
The team can analyze and respond to resource exhaustion incidents, reducing the impact of attacks that exploit uncontrolled consumption weaknesses.
Timely maintenance support and spare parts enable rapid recovery from failures induced by uncontrolled resource consumption, shortening the impact window of denial-of-service attacks.