Severity
7.5HIGH
EPSS
0.3%
top 49.11%
CISA KEV
Not in KEV
Exploit
No known exploits
Affected products
Timeline
PublishedApr 11
Latest updateMay 24

Description

In the standard library in Rust before 1.49.0, String::retain() function has a panic safety problem. It allows creation of a non-UTF-8 Rust string when the provided closure panics. This bug could result in a memory safety violation when other string APIs assume that UTF-8 encoding is used on the same string.

CVSS vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HExploitability: 3.9 | Impact: 3.6

Affected Packages2 packages

NVDrust-lang/rust< 1.49.0
Debianrustc< 1.53.0+dfsg1-1+2

Patches

🔴Vulnerability Details

3
GHSA
GHSA-jc5q-p9cv-j8pj: In the standard library in Rust before 12022-05-24
OSV
CVE-2020-36317: In the standard library in Rust before 12021-04-11
CVEList
CVE-2020-36317: In the standard library in Rust before 12021-04-11

📋Vendor Advisories

3
Microsoft
In the standard library in Rust before 1.49.0 String::retain() function has a panic safety problem. It allows creation of a non-UTF-8 Rust string when the provided closure panics. This bug could resul2021-04-13
Red Hat
rust: memory safety violation in String::retain()2020-10-28
Debian
CVE-2020-36317: rustc - In the standard library in Rust before 1.49.0, String::retain() function has a p...2020
CVE-2020-36317 (HIGH CVSS 7.5) | In the standard library in Rust bef | cvebase.io