CVE-2022-31100: Rulex Reachable Assertion Vulnerability
MODERATECVE-2022-31100 is a MODERATE (CVSS 6.5) reachable assertion vulnerability (CWE-617: Reachable Assertion) affecting Rulex libraries in the crates.io ecosystem. The issue involves reachable assertion in rulex. Remediation is available by upgrading affected packages to version 0.4.3.
CVE-2022-31100 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H).
How to Fix CVE-2022-31100
To remediate this vulnerability, upgrade all affected Rulex dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade rulex to 0.4.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for rulex
How to Check if You Are Affected
To determine whether your application is affected by CVE-2022-31100, inspect your project dependencies for Rulex:
inspect dependencies for rulex
Analyze the terminal output to locate any version of Rulex in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.4.3), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-617: Reachable Assertion, where the product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary. In Rulex, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2022-31100 Affected Rulex Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
rulex
|
crates.io |
< 0.4.3
|
0.4.3
|
References
Frequently Asked Questions
What is CVE-2022-31100?
Which Rulex versions are affected?
What version fixes CVE-2022-31100?
Is rulex affected?
What is the CVSS score of CVE-2022-31100?
What CWE is associated with CVE-2022-31100?
How can I check crates.io dependencies for CVE-2022-31100?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8v9w-p43c-r885",
"modified" : "2022-06-29T21:42:56Z",
"published" : "2022-06-21T20:12:15Z",
"aliases" : [ "CVE-2022-31100" ],
"summary" : "Reachable Assertion in rulex",
"details" : "### Impact\nWhen 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.\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 thread running rulex panics.\n\n### Patches\nThe crashes are fixed in version **0.4.3**. Affected users are advised to update to this version.\n\n### Workarounds\nYou can use `catch_unwind` to recover from panics.\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- [cargo fuzz](https://github.com/rust-fuzz/cargo-fuzz) and [afl.rs](https://github.com/rust-fuzz/afl.rs)\n- [evanrichter](https://github.com/evanrichter)\n- [ForAllSecure Mayhem](https://forallsecure.com/)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "rulex"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.4.3"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rulex-rs/rulex/security/advisories/GHSA-8v9w-p43c-r885"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-31100"
}, {
"type" : "WEB",
"url" : "https://github.com/rulex-rs/rulex/commit/fac6d58b25c6f9f8c0a6cdc4dec75b37b219f1d6"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rulex-rs/rulex"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2022-0031.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-617" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-06-21T20:12:15Z",
"nvd_published_at" : "2022-06-27T22:15:00Z"
}
}