Rust advisories / string-interner
Vulnerability HighRUSTSEC-2019-0023 · string-interner
RUSTSEC-2019-0023: Cloned interners may read already dropped strings
Short answerA security vulnerability in the string-interner crate: Cloned interners may read already dropped strings. High severity (CVSS 7.5). Fixed in 0.6.4, 0.7.1: update to a fixed version.
| Crate | string-interner |
|---|---|
| Type | Vulnerability |
| Affected versions | Before 0.6.4; from 0.7.0 before 0.7.1. |
| Fixed in | 0.6.4, 0.7.1 |
| Severity | High, CVSS 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| Published | 2019-08-24 |
| Last changed | 2023-11-08 |
| Also known as | CVE-2019-16882, GHSA-49fq-pw77-6qxj |
What to do
- See which version you have:
cargo tree -i string-interner(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p string-interner. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplestring-interner = "0.7.1") or update the dependency that pulls it in. - Check again with
cargo audit, or paste your Cargo.lock into our Cargo.toml checker.
Details from the advisory
Affected versions of this crate did not clone contained strings when an interner is cloned. Interners have raw pointers to the contained strings, and they keep pointing the strings which the old interner owns, after the interner is cloned. If a new cloned interner is alive and the old original interner is dead, the new interner has dangling pointers to the old interner's storage, which is already dropped.
This allows an attacker to read the already freed memory. The dangling pointers are used by the interners to check a string is already interned. An attacker can do brute force attack to get the data pointed by the dangling pointer.
The flaw was corrected by <https://github.com/Robbepop/string-interner/pull/10>. This patch implements Clone manually to the interner type, so that the internal raw pointers always point the strings owned by the same interner.
PR #10 was also backported to the 0.6 release line in <https://github.com/Robbepop/string-interner/pull/14> and was released in 0.6.4.
References
- Package: crates.io/crates/string-interner
- Advisory: rustsec.org/advisories/RUSTSEC-2019-0023.html
- Report: github.com/Robbepop/string-interner/issues/9
From the RustSec Advisory Database (CC0-1.0) via the OSV export, downloaded Oct 24, 2026. Severity score computed from the published CVSS vector.
Up next
Are you affected?Check your whole dependency treePaste Cargo.lock: every advisory, for your exact versions.Read it next →Also worth your time
Did this answer your question?