In the standard library in Rust before 1.52.0, there is an optimization for joining strings that can cause uninitialized bytes to be exposed (or the program to crash) if the borrowed string changes after its length is checked.
Reference Links(if available):
CVSS Score (if available)
v2: / HIGHAV:N/AC:L/Au:N/C:P/I:N/A:P
v3: / HIGHCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:H