CVE-2022-31100 Reachable Assertion in rulex
Attackers can cause a denial of service by providing crafted regular expressions that trigger a panic in the rulex library.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-31100?
CVE-2022-31100 is a medium-severity denial of service vulnerability in rulex-rs rulex, published on 27 Jun 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
rulex is a new, portable, regular expression language. When parsing untrusted rulex expressions, rulex may crash, possibly enabling a Denial of Service attack. This happens when the expression contains a multi-byte UTF-8 code point in a string literal or after a backslash, because rulex tries to slice into the code point and panics as a result. This is a security concern for you, if your service parses untrusted rulex expressions (expressions provided by an untrusted user), and your service becomes unavailable when the thread running rulex panics. The crashes are fixed in version **0.4.3**. Affected users are advised to update to this version. The only known workaround for this issue is to assume that regular expression parsing will panic and to add logic to catch panics.
Weakness: CWE-617
Which versions are affected by CVE-2022-31100?
3 open source packages ship an affected version, including rulex. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
rulex crates.io | All versions | 0.4.3 |
rulex crates.io | All versions | 0.4.3 |
rulex crates.io | From 0.0.0-0 | 0.4.3 |
Products include Pomsky-Lang Pomsky.
How do I fix CVE-2022-31100?
Upgrade rulex to 0.4.3 or later.
Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.
Is CVE-2022-31100 being exploited?
There is no known exploitation of CVE-2022-31100 in the wild and no public exploit code.
Other vulnerabilities in rulex-rs rulex
Sources
Also known as GHSA-8v9w-p43c-r885, RUSTSEC-2022-0031.