Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS04djl3LXA0M2Mtcjg4Nc4AAs5d
Reachable Assertion in rulex
Impact
When 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.
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 thread running rulex panics.
Patches
The crashes are fixed in version 0.4.3. Affected users are advised to update to this version.
Workarounds
You can use catch_unwind
to recover from panics.
For more information
If you have any questions or comments about this advisory:
- Open an issue in rulex
- Email me at [email protected]
Credits
Credit for finding these bugs goes to
Permalink: https://github.com/advisories/GHSA-8v9w-p43c-r885JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS04djl3LXA0M2Mtcjg4Nc4AAs5d
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: over 2 years ago
Updated: almost 2 years ago
CVSS Score: 6.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
EPSS Percentage: 0.00073
EPSS Percentile: 0.33535
Identifiers: GHSA-8v9w-p43c-r885, CVE-2022-31100
References:
- https://github.com/rulex-rs/rulex/security/advisories/GHSA-8v9w-p43c-r885
- https://nvd.nist.gov/vuln/detail/CVE-2022-31100
- https://github.com/rulex-rs/rulex/commit/fac6d58b25c6f9f8c0a6cdc4dec75b37b219f1d6
- https://rustsec.org/advisories/RUSTSEC-2022-0031.html
- https://github.com/advisories/GHSA-8v9w-p43c-r885
Blast Radius: 1.0
Affected Packages
cargo:rulex
Dependent packages: 2Dependent repositories: 0
Downloads: 7,652 total
Affected Version Ranges: < 0.4.3
Fixed in: 0.4.3
All affected versions: 0.1.0, 0.2.0, 0.3.0, 0.4.0, 0.4.1, 0.4.2
All unaffected versions: 0.4.3, 0.4.4