CVE-2020-36317

Summary

CVECVE-2020-36317
StatePUBLIC
Assigner[email protected]
Source PriorityCVE Program / NVD first with legacy fallback
Published2021-04-11 20:15:00 UTC
Updated2022-06-28 14:11:00 UTC
DescriptionIn 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.

Risk And Classification

Problem Types: CWE-787

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Rust-lang Rust All All All All

References

ReferenceSourceLinkTags
String::retain allows safely creating invalid (non-utf8) strings when abusing panic · Issue #78498 · rust-lang/rust · GitHub MISC github.com
Prevent String::retain from creating non-utf8 strings when abusing panic by SkiFire13 · Pull Request #78499 · rust-lang/rust · GitHub MISC github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 159229 Oracle Enterprise Linux Security Update for rust-toolset:ol8 (ELSA-2021-1935)
  • 239287 Red Hat Update for rust-toolset:rhel8 (RHSA-2021:1935)
  • 296065 Oracle Solaris 11.4 Support Repository Update (SRU) 39.107.1 Missing (CPUOCT2021)
  • 900062 CBL-Mariner Linux Security Update for rust 1.47.0
  • 902881 Common Base Linux Mariner (CBL-Mariner) Security Update for rust (4080)
  • 940382 AlmaLinux Security Update for rust-toolset:rhel8 (ALSA-2021:1935)
  • 960878 Rocky Linux Security Update for rust-toolset:rhel8 (RLSA-2021:1935)
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

CVE.report and Source URL Uptime Status status.cve.report