{"id":"GHSA-2rxc-gjrp-vjhx","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.","aliases":["RUSTSEC-2024-0404"],"modified":"2026-07-17T21:08:37.713110226Z","published":"2024-12-04T18:31:31Z","database_specific":{"github_reviewed_at":"2024-12-04T18:31:31Z","nvd_published_at":null,"cwe_ids":[],"severity":"MODERATE","github_reviewed":true},"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"}],"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"}}],"schema_version":"1.9.0"}