{"schema_version":"1.9.0","id":"GHSA-2rxc-gjrp-vjhx","published":"2024-12-04T18:31:31Z","modified":"2026-09-10T03:50:21.162155425Z","aliases":["RUSTSEC-2024-0404"],"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.","affected":[{"package":{"name":"anstream","ecosystem":"crates.io","purl":"pkg:cargo/anstream"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"0.6.8"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/12/GHSA-2rxc-gjrp-vjhx/GHSA-2rxc-gjrp-vjhx.json"}}],"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":[],"github_reviewed":true,"github_reviewed_at":"2024-12-04T18:31:31Z","nvd_published_at":null,"severity":"MODERATE"}}