CVE Database›CVE-2020-36317

CVE-2020-36317

rust: memory safety violation in String::retain()

Loading…

Severity

Low

Red Hat Product Security

5.3

CVSS 3.1

Review impact separately from score.

Published · October 28, 2020

Updated · February 26, 2026

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 score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

No mitigation is specified in collected source.

CVSS / CWE

CVSS 3.1 · 5.3
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N

CWE-119 · Improper Restriction of Operations within the Bounds of a Memory Buffer