RUSTSEC-2022-0031

Source
https://rustsec.org/advisories/RUSTSEC-2022-0031
Import Source
https://github.com/rustsec/advisory-db/blob/osv/crates/RUSTSEC-2022-0031.json
JSON Data
https://api.osv.dev/v1/vulns/RUSTSEC-2022-0031
Aliases
Published
2022-05-21T12:00:00Z
Modified
2023-11-08T04:09:26.020407Z
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.

Database specific
{
    "license": "CC0-1.0"
}
References

Affected packages

crates.io / rulex

Package

Affected ranges

Type
SEMVER
Events
Introduced
0.0.0-0
Fixed
0.4.3

Ecosystem specific

{
    "affected_functions": null,
    "affects": {
        "os": [],
        "functions": [],
        "arch": []
    }
}

Database specific

{
    "cvss": null,
    "informational": null,
    "categories": [
        "denial-of-service"
    ]
}