Advisory

RUSTSEC-2022-0031

Also known as: CVE-2022-31100, GHSA-8v9w-p43c-r885

Summary

Panic due to improper UTF-8 indexing

Details

When parsing untrusted rulex expressions, rulex may panic, 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.

The flaw was corrected in commits fac6d58b25 and 330b3534e7 by using
len_utf8() to derive character width in bytes instead of assuming ASCII
encoding of 1 byte per char.

Severity

Not rated by the source.

Dates

Published
2022-05-21 12:00 UTC
Modified
2026-10-12 18:00 UTC

Affected packages and fixes

rulex

crates.io · All systems

Affected

  • introduced 0.0.0-0, fixed 0.4.3 (semver)

Fixed versions

0.4.3

Fix

  • Fixed version 0.4.3
    cargo update -p rulex --precise 0.4.3

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: RustSec Advisory Database · CC0-1.0

Sources & licences