CVE-2022-31099 is a medium-severity (CVSS 6.5) CWE-674 vulnerability in rulex. A fix is available for rulex — see the affected versions and patch details below.
Uncontrolled Recursion in rulex
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2022-31099.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
rulexReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects crates.io packages — download data is not available via public APIs for these ecosystems.
Description
Impact
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.
Patches
The crash is fixed in version 0.4.3. Affected users are advised to update to this version.
Workarounds
None.
For more information
If you have any questions or comments about this advisory:
- Open an issue in rulex
- Email me at [email protected]
Credits
Credit for finding these bugs goes to
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🦀crates.io | rulex | all versions | 0.4.3cargo update -p rulex --precise 0.4.3 |
Affected Products
pomskypomsky-langDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for rulex, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update rulex to 0.4.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-31099 is resolved across your whole dependency graph.
Workarounds
Stop feeding it untrusted input: reject or quarantine files and payloads from unverified sources until you can upgrade, restrict accepted formats to the ones you actually need, and run the parsing or decoding step in a least-privileged sandbox or short-lived worker so a crash or corrupted read cannot reach the rest of the process.
Frequently Asked Questions
Is CVE-2022-31099 in your dependencies?
Find it across crates.io, including transitive dependencies.