RUSTSEC-2024-0404 β anstream
Package
Manager: cargo
Name: anstream
Vulnerable Version: >=0.0.0-0 <0.6.8
Severity
Level: Low
CVSS v3.1: CVSS:3.1/AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L/E:P/RL:O/RC:C
CVSS v4.0: CVSS:4.0/AV:A/AC:H/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N
EPSS: N/A pctlN/A
Details
Unsoundness in anstream 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.
Metadata
Created: 2024-09-08T12:00:00Z
Modified: 2024-12-04T12:39:59Z
Source: https://osv-vulnerabilities
CWE IDs: N/A
Alternative ID: N/A
Finding: F316
Auto approve: 1