CVE-2022-31100 Reachable Assertion in rulex

Medium 6.5 Published Updated

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.

PackageAffectedFixed in
rulex crates.ioAll versions0.4.3
rulex crates.ioAll versions0.4.3
rulex crates.ioFrom 0.0.0-00.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.

Sources

Also known as GHSA-8v9w-p43c-r885, RUSTSEC-2022-0031.

Is CVE-2022-31100 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free