{"id":"CVE-2020-35865","aliases":["CVE-2020-35865","GHSA-q948-x8rf-888m","RUSTSEC-2020-0012"],"related":[],"kind":"vulnerability","state":"published","title":"os_str_bytes relies on undefined behavior of `char::from_u32_unchecked`","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"The Windows implementation of this crate relied on the behavior of std::char::from_u32_unchecked when its safety clause is violated. Even though this worked with Rust versions up to 1.42 (at least), that behavior could change with any new Rust version, possibly leading a security issue.\n\nThe flaw was corrected in version 2.0.0.","format":"markdown","source":"ghsa"},{"lang":"en","text":"The Windows implementation of this crate relied on the behavior of\n`std::char::from_u32_unchecked` when its safety clause is violated.\nEven though this worked with Rust versions up to 1.42 (at least),\nthat behavior could change with any new Rust version, possibly leading\na security issue.\n\nThe flaw was corrected in version 2.0.0.","format":"markdown","source":"rustsec"},{"lang":"es","text":"Se detectó un problema en la crate os_str_bytes versiones anteriores a 2.0.0 para Rust.&#xa0;Presenta falsas expectativas sobre el comportamiento de la función char::from_u32_unchecked.","source":"nvd"}],"published":"2020-04-24T12:00:00.000Z","modified":"2026-06-17T03:14:29.523Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"RustSec Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:N/I:N/A:P","score":5,"rating":"MEDIUM"}],"cwes":["CWE-704"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.0.0"}],"ecosystem":"crates.io","package":"os_str_bytes","purl":"pkg:cargo/os_str_bytes","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.0.0-0","status":"affected","fixed":"2.0.0"}],"ecosystem":"crates.io","package":"os_str_bytes","purl":"pkg:cargo/os_str_bytes","source":"rustsec"},{"ranges":[{"status":"affected","fixed":"2.0.0"}],"vendor":"os_str_bytes_project","product":"os_str_bytes","cpe":"cpe:2.3:a:os_str_bytes_project:os_str_bytes:*:*:*:*:*:rust:*:*","source":"nvd"}],"references":[{"url":"https://rustsec.org/advisories/RUSTSEC-2020-0012.html","tags":["advisory","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","rustsec","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2020-35865","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/dylni/os_str_bytes/pull/1","tags":["web"],"sources":["ghsa","rustsec"]},{"url":"https://github.com/dylni/os_str_bytes","tags":["package"],"sources":["ghsa"]},{"url":"https://crates.io/crates/os_str_bytes","tags":["package"],"sources":["rustsec"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2020-35865","url":"https://www.cve.org/CVERecord?id=CVE-2020-35865","licence":"CVE Terms of Use","modified":"2024-08-04T17:16:12.645Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-q948-x8rf-888m","url":"https://github.com/advisories/GHSA-q948-x8rf-888m","licence":"CC-BY-4.0","modified":"2023-11-08T04:03:36.337Z"},{"source":"rustsec","name":"RustSec Advisory Database","id":"RUSTSEC-2020-0012","url":"https://rustsec.org/advisories/RUSTSEC-2020-0012.html","licence":"CC0-1.0","modified":"2023-11-08T04:03:36.337Z"},{"source":"nvd","name":"NVD","id":"CVE-2020-35865","url":"https://nvd.nist.gov/vuln/detail/CVE-2020-35865","licence":"Public domain","modified":"2026-06-17T03:14:29.523Z"}],"updatedAt":"2026-11-25T22:57:56.669Z","epss":{"score":0.01352,"percentile":0.72358,"date":"2026-12-01T12:00:22.000Z"}}