Unsoundness in anstream
Key facts
- Attack vector
- —
- Privileges required
- —
- User interaction
- —
- Attack complexity
- —
- Impact type
- —
- Confidentiality · integrity · availability
- —
- Fix status
- Fixed
No CVSS vector from any source. Fix status from GitHub.
Summary
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. When looping over "non-printable bytes" \x1b\xf0 will be considered as some non-printable sequence. This will produce a broken str from the incorrectly segmented bytes via str::from_utf8_unchecked, and that should never happen. Full credit goes to @Ralith who reviewed this code and asked @burakemir to follow up.
Why it matters now
SSVC decision points
Not available: CISA has not published SSVC decision points for this record.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | anstream (crates.io) | before 0.6.8 | 0.6.8 | Patch available | GHSA-2rxc-gjrp-vjhx |
- anstream (crates.io) Vendor— Affected before 0.6.8 Fixed in 0.6.8 Patch available GHSA-2rxc-gjrp-vjhx
Remediation
- Fix · GHSA-2rxc-gjrp-vjhx anstream (crates.io) Fixed in 0.6.8 Advisory →
Timeline
- 2026-10-03 Threatist record created from GHSA-2rxc-gjrp-vjhx
References
Sources
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences