GHSA-2rxc-gjrp-vjhx: Anstream Unsoundness Vulnerability
MODERATEGHSA-2rxc-gjrp-vjhx is a MODERATE unsoundness vulnerability (General Security Weakness) affecting Anstream libraries in the crates.io ecosystem. The issue involves unsoundness in anstream. Remediation is available by upgrading affected packages to version 0.6.8.
GHSA-2rxc-gjrp-vjhx at a Glance
How to Fix GHSA-2rxc-gjrp-vjhx
To remediate this vulnerability, upgrade all affected Anstream 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 anstream to 0.6.8
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for anstream
How to Check if You Are Affected
To determine whether your application is affected by GHSA-2rxc-gjrp-vjhx, inspect your project dependencies for Anstream:
inspect dependencies for anstream
Analyze the terminal output to locate any version of Anstream in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.8), 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 General Security Weakness. In Anstream, 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
GHSA-2rxc-gjrp-vjhx Affected Anstream Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
anstream
|
crates.io |
< 0.6.8
|
0.6.8
|
References
Frequently Asked Questions
What is GHSA-2rxc-gjrp-vjhx?
Which Anstream versions are affected?
What version fixes GHSA-2rxc-gjrp-vjhx?
Is anstream affected?
What CWE is associated with GHSA-2rxc-gjrp-vjhx?
How can I check crates.io dependencies for GHSA-2rxc-gjrp-vjhx?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2rxc-gjrp-vjhx",
"modified" : "2024-12-04T18:31:31Z",
"published" : "2024-12-04T18:31:31Z",
"aliases" : [ ],
"summary" : "Unsoundness in anstream",
"details" : "When given a valid UTF8 string \"รถ\\x1b๐\", the function in crates/anstream/src/adapter/strip.rs will be confused. The UTF8 bytes are \\xc3\\xb6 then \\x1b then \\xf0\\x9f\\x98\\x80.\n\nWhen looping over \"non-printable bytes\" \\x1b\\xf0 will be considered as some non-printable sequence.\n\nThis will produce a broken str from the incorrectly segmented bytes via str::from_utf8_unchecked, and that should never happen.\n\nFull credit goes to @Ralith who reviewed this code and asked @burakemir to follow up.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "anstream"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.6.8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/rust-cli/anstyle/issues/156"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/rust-cli/anstyle"
}, {
"type" : "WEB",
"url" : "https://rustsec.org/advisories/RUSTSEC-2024-0404.html"
} ],
"database_specific" : {
"cwe_ids" : [ ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-12-04T18:31:31Z",
"nvd_published_at" : null
}
}