{"id":"CVE-2022-31100","aliases":["GHSA-8v9w-p43c-r885","RUSTSEC-2022-0031"],"url":"https://o3.security/vulnerability/CVE-2022-31100","summary":"Reachable Assertion in rulex","details":"### Impact\nWhen 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.\n\nThis is a security concern for you, if\n- your service parses untrusted rulex expressions (expressions provided by an untrusted user), and\n- your service becomes unavailable when the thread running rulex panics.\n\n### Patches\nThe crashes are fixed in version **0.4.3**. Affected users are advised to update to this version.\n\n### Workarounds\nYou can use `catch_unwind` to recover from panics.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [rulex](https://github.com/rulex-rs/rulex/issues)\n* Email me at [ludwig.stecher@gmx.de](mailto:ludwig.stecher@gmx.de)\n\n### Credits\n\nCredit for finding these bugs goes to\n\n- [cargo fuzz](https://github.com/rust-fuzz/cargo-fuzz) and [afl.rs](https://github.com/rust-fuzz/afl.rs)\n- [evanrichter](https://github.com/evanrichter)\n- [ForAllSecure Mayhem](https://forallsecure.com/)","published":"2022-06-27T22:10:11Z","modified":"2026-10-28T02:30:56.767949865Z","cvss":{"score":6.5,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"},"epss":{"score":0.00833,"percentile":0.54511,"asOf":"2026-08-23"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"crates.io","name":"rulex","fixedVersion":"0.4.3"}],"fix":{"url":"https://github.com/rulex-rs/rulex/commit/fac6d58b25c6f9f8c0a6cdc4dec75b37b219f1d6","label":"rulex-rs/rulex@fac6d58"},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/31xxx/CVE-2022-31100.json"},{"type":"ADVISORY","url":"https://github.com/rulex-rs/rulex/security/advisories/GHSA-8v9w-p43c-r885"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31100"},{"type":"FIX","url":"https://github.com/rulex-rs/rulex/commit/fac6d58b25c6f9f8c0a6cdc4dec75b37b219f1d6"},{"type":"PACKAGE","url":"https://github.com/rulex-rs/rulex"},{"type":"WEB","url":"https://rustsec.org/advisories/RUSTSEC-2022-0031.html"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-10-28T02:30:56.767949865Z"}}