{"id":"RUSTSEC-2024-0404","revision":"5a059fddca994b1d9f6083995f2da65c","records":[{"revision":"5a059fddca994b1d9f6083995f2da65c","observedAt":"2026-10-24T13:19:54.901+00:00","statement":{"source":"osv","id":"RUSTSEC-2024-0404","aliases":["GHSA-2rxc-gjrp-vjhx"],"title":"Unsoundness in anstream","description":"When given a valid UTF8 string \"ö\\x1b\uD83D\uDE00\", the function in\ncrates/anstream/src/adapter/strip.rs will be confused. The UTF8\nbytes are \\xc3\\xb6 then \\x1b then \\xf0\\x9f\\x98\\x80.\n\nWhen looping over \"non-printable bytes\" \\x1b\\xf0 will be\nconsidered as some non-printable sequence.\n\nThis will produce a broken str from the incorrectly segmented\nbytes via str::from_utf8_unchecked, and that should never happen.\n\nFull credit goes to [@Ralith](https://github.com/Ralith) who reviewed this code and\nasked [@burakemir](https://github.com/burakemir) to follow up.","state":0,"publishedAt":"2024-09-08T12:00:00+00:00","modifiedAt":"2026-07-17T16:00:04.5612105+00:00","affected":[{"ecosystem":"crates.io","name":"anstream","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0.0.0-0"},{"kind":"fixed","version":"0.6.8"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://crates.io/crates/anstream","https://rustsec.org/advisories/RUSTSEC-2024-0404.html","https://github.com/rust-cli/anstyle/issues/156"],"sourceUrl":"https://osv.dev/vulnerability/RUSTSEC-2024-0404","license":"OSV · upstream source license applies","key":"osv:RUSTSEC-2024-0404","identifiers":["RUSTSEC-2024-0404","GHSA-2rxc-gjrp-vjhx"]},"retained":false,"historicalAffected":[]}],"coverage":[]}