{"id":"RUSTSEC-2022-0031","revision":"2ca10c7b0d7b48ef98a010d4310ef862","records":[{"revision":"2ca10c7b0d7b48ef98a010d4310ef862","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2022-0031","aliases":["CVE-2022-31100","GHSA-8v9w-p43c-r885"],"title":"Panic due to improper UTF-8 indexing","description":"When parsing untrusted rulex expressions, rulex may panic, possibly enabling\na Denial of Service attack. This happens when the expression contains a multi-\nbyte UTF-8 code point in a string literal or after a backslash, because rulex\ntries to slice into the code point and panics as a result.\n\nThe flaw was corrected in commits `fac6d58b25` and `330b3534e7` by using\n`len_utf8()` to derive character width in bytes instead of assuming ASCII\nencoding of 1 byte per char.","state":0,"publishedAt":"2022-05-21T12:00:00+00:00","modifiedAt":"2026-10-12T18:00:05.1153014+00:00","affected":[{"ecosystem":"crates.io","name":"rulex","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"0.4.3"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://crates.io/crates/rulex","https://rustsec.org/advisories/RUSTSEC-2022-0031.html","https://github.com/rulex-rs/rulex/commit/fac6d58b25c6f9f8c0a6cdc4dec75b37b219f1d6"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2022-0031","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2022-0031","identifiers":["RUSTSEC-2022-0031","CVE-2022-31100","GHSA-8v9w-p43c-r885"]},"retained":false,"historicalAffected":[]}],"coverage":[]}