{"id":"CVE-2022-31099","aliases":["CVE-2022-31099","GHSA-v78m-2q7v-fjqp","RUSTSEC-2022-0030"],"related":[],"kind":"vulnerability","state":"published","title":"Uncontrolled Recursion in rulex","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nWhen 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.\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 process running rulex aborts due to a stack overflow.\n\n### Patches\nThe crash is fixed in version **0.4.3**. Affected users are advised to update to this version.\n\n### Workarounds\nNone.\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- [evanrichter](https://github.com/evanrichter)\n- [ForAllSecure Mayhem](https://forallsecure.com/)\n- [cargo fuzz](https://github.com/rust-fuzz/cargo-fuzz) and [afl.rs](https://github.com/rust-fuzz/afl.rs)","format":"markdown","source":"ghsa"},{"lang":"en","text":"When parsing untrusted rulex expressions, the stack may overflow, possibly\nenabling a Denial of Service attack. This happens when parsing an expression\nwith several hundred levels of nesting, causing the process to abort\nimmediately.\n\nThe flaw was corrected in commits `60aa2dc03a` by adding a check to recursion\ndepth.","format":"markdown","source":"rustsec"},{"lang":"es","text":"rulex es un nuevo lenguaje de expresiones regulares portátil. Cuando son analizadas expresiones de rulex que no son confiables, la pila puede desbordarse, permitiendo posiblemente un ataque de Denegación de Servicio. Esto sucede cuando es analizada una expresión con varios cientos de niveles de anidamiento, causando que el proceso sea abortado inmediatamente. Esto es un problema de seguridad para usted, si su servicio analiza expresiones rulex que no son confiables (expresiones proporcionadas por un usuario que no es confiable), y su servicio no está disponible cuando el proceso que ejecuta rulex aborta debido a un desbordamiento de la pila. El bloqueo ha sido corregido en versión **0.4.3**. Es recomendado a usuarios afectados actualizar a esta versión. No se presentan mitigaciones conocidas para este problema","source":"nvd"}],"published":"2022-05-21T12:00:00.000Z","modified":"2026-10-12T18:00:05.119Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:S/C:N/I:N/A:P","score":4,"rating":"MEDIUM"}],"cwes":["CWE-674"],"affected":[{"ranges":[{"version":"< 0.4.3","status":"affected"}],"vendor":"rulex-rs","product":"rulex","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.4.3"}],"ecosystem":"crates.io","package":"rulex","purl":"pkg:cargo/rulex","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"0.4.3"}],"ecosystem":"crates.io","package":"rulex","purl":"pkg:cargo/rulex","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"0.4.3"}],"vendor":"pomsky-lang","product":"pomsky","cpe":"cpe:2.3:a:pomsky-lang:pomsky:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://github.com/rulex-rs/rulex/security/advisories/GHSA-v78m-2q7v-fjqp","tags":["third-party-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/rulex-rs/rulex/commit/60aa2dc03a22d69c8800fec81f99c96958a11363","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31099","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/rulex-rs/rulex","tags":["package"],"sources":["ghsa"]},{"url":"https://rustsec.org/advisories/RUSTSEC-2022-0030.html","tags":["advisory","web"],"sources":["ghsa","rustsec"]},{"url":"https://crates.io/crates/rulex","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2025-04-23T14:04:15.917Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-31099","url":"https://www.cve.org/CVERecord?id=CVE-2022-31099","licence":"CVE Terms of Use","modified":"2025-04-23T18:06:21.333Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v78m-2q7v-fjqp","url":"https://github.com/advisories/GHSA-v78m-2q7v-fjqp","licence":"CC-BY-4.0","modified":"2023-11-08T04:09:25.959Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2022-0030","url":"https://rustsec.org/advisories/RUSTSEC-2022-0030.html","licence":"CC0-1.0","modified":"2026-10-12T18:00:05.119Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-31099","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-31099","licence":"Public domain","modified":"2026-06-17T04:44:47.717Z"}],"updatedAt":"2026-11-25T22:58:12.602Z","epss":{"score":0.00985,"percentile":0.63349,"date":"2026-12-01T12:00:22.000Z"}}