CVE-2020-35865 json
os_str_bytes relies on undefined behavior of `char::from_u32_unchecked`
published 2020-04-24 6 y ago modified 2026-06-17 4 mo ago also GHSA-q948-x8rf-888m , RUSTSEC-2020-0012 , EUVD-2021-1837
- cvss
- 7.5
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 71%
- public exploits
- 0
- none known
Summary
An issue was discovered in the os_str_bytes crate before 2.0.0 for Rust. It has false expectations about char::from_u32_unchecked behavior.
Patch / fix
- crates.io os_str_bytes 2.0.0
- os_str_bytes_project os_str_bytes 2.0.0
- github.com/dylni/os_str_bytes#1 pull request
- rustsec.org/advisories/RUSTSEC-2020-0012.html advisory
Exploit prediction
1.35% chance of exploitation in the next 30 days, higher than 71% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:N/I:N/A:P |
| OSV | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 3.1 | 7.5 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| crates.io | os_str_bytes | <2.0.0 >=0.0.0-0, <2.0.0 |
2.0.0 |
Classification
- Weakness
-
- CWE-704 Incorrect Type Conversion or Cast
References
-
rustsec.org
/advisories/RUSTSEC-2020-0012.html
web, patch, third-party-advisory, advisory
-
github.com
/dylni/os_str_bytes/pull/1
web
-
nvd.nist.gov
/vuln/detail/CVE-2020-35865
advisory
-
github.com
/dylni/os_str_bytes
package
-
crates.io
/crates/os_str_bytes
package
Sources
- CVE List CVE-2020-35865
- GitHub Advisory GHSA-q948-x8rf-888m
- NVD CVE-2020-35865
- OSV RUSTSEC-2020-0012
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.