All vulnerabilities

Servers and applications

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.

Severity
High 7.5
Published
11 Apr 2021
Last changed
17 Jun 2026
Added to UpHeron
22 Oct 2026
Fixed in
1.49.0
Sources
NVD

Affected software

SoftwareAffected versions
RustServers and applications · cpe:a:rust-lang:rust
  • Every version before 1.49.0

References

  • NVD https://nvd.nist.gov/vuln/detail/CVE-2020-36317
  • CVE.org https://www.cve.org/CVERecord?id=CVE-2020-36317