CVE-2022-31099 Uncontrolled Recursion in rulex
Attackers can cause a denial of service by providing deeply nested rulex expressions, crashing the application via stack overflow.
- 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-31099?
CVE-2022-31099 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, the stack may overflow, possibly enabling a Denial of Service attack. This happens when parsing an expression with several hundred levels of nesting, causing the process to abort immediately. 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 process running rulex aborts due to a stack overflow. The crash is fixed in version **0.4.3**. Affected users are advised to update to this version. There are no known workarounds for this issue.
Weakness: CWE-674
Which versions are affected by CVE-2022-31099?
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-31099?
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-31099 being exploited?
There is no known exploitation of CVE-2022-31099 in the wild and no public exploit code.
Other vulnerabilities in rulex-rs rulex
Sources
Also known as GHSA-v78m-2q7v-fjqp, RUSTSEC-2022-0030.