Vulnerability Details : CVE-2020-36317
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.
Vulnerability category: Memory Corruption
Products affected by CVE-2020-36317
- cpe:2.3:a:rust-lang:rust:*:*:*:*:*:*:*:*
Exploit prediction scoring system (EPSS) score for CVE-2020-36317
0.16%
Probability of exploitation activity in the next 30 days
EPSS Score History
~ 52 %
Percentile, the proportion of vulnerabilities that are scored at or less
CVSS scores for CVE-2020-36317
Base Score | Base Severity | CVSS Vector | Exploitability Score | Impact Score | Score Source | First Seen |
---|---|---|---|---|---|---|
5.0
|
MEDIUM | AV:N/AC:L/Au:N/C:N/I:N/A:P |
10.0
|
2.9
|
NIST | |
7.5
|
HIGH | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
3.9
|
3.6
|
NIST |
CWE ids for CVE-2020-36317
-
The product writes data past the end, or before the beginning, of the intended buffer.Assigned by: nvd@nist.gov (Primary)
References for CVE-2020-36317
-
https://github.com/rust-lang/rust/issues/78498
String::retain allows safely creating invalid (non-utf8) strings when abusing panic · Issue #78498 · rust-lang/rust · GitHubExploit;Issue Tracking;Third Party Advisory
-
https://github.com/rust-lang/rust/pull/78499
Prevent String::retain from creating non-utf8 strings when abusing panic by SkiFire13 · Pull Request #78499 · rust-lang/rust · GitHubPatch;Third Party Advisory
Jump to