Vulnerability HighRUSTSEC-2022-0002 · dashmap
RUSTSEC-2022-0002: Unsoundness in `dashmap` references
Short answerA security vulnerability in the dashmap crate: Unsoundness in `dashmap` references. GitHub rates it High. Fixed in 5.1.0: update to a fixed version.
| Crate | dashmap |
|---|---|
| Type | Vulnerability (memory-exposure, memory-corruption) |
| Affected versions | From 5.0.0 before 5.1.0. |
| Fixed in | 5.1.0 |
| Severity | High (GitHub rating) |
| Published | 2022-01-10 |
| Last changed | 2023-11-08 |
| Also known as | GHSA-mpg5-fvwp-42m2 |
| Affected functions | dashmap::mapref::multiple::RefMulti::key, dashmap::mapref::multiple::RefMulti::pair, dashmap::mapref::multiple::RefMulti::value, dashmap::mapref::multiple::RefMutMulti::key, dashmap::mapref::multiple::RefMutMulti::pair, dashmap::mapref::multiple::RefMutMulti::pair_mut, dashmap::mapref::one::Ref::key, dashmap::mapref::one::Ref::pair, dashmap::mapref::one::Ref::value, dashmap::mapref::one::RefMut::key, dashmap::mapref::one::RefMut::pair, dashmap::mapref::one::RefMut::pair_mut |
What to do
- See which version you have:
cargo tree -i dashmap(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p dashmap. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampledashmap = "5.1.0") 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
Reference returned by some methods of Ref (and similar types) may outlive the Ref and escape the lock. This causes undefined behavior and may result in a segfault.
More information in dashmap#167 issue.
References
- Package: crates.io/crates/dashmap
- Advisory: rustsec.org/advisories/RUSTSEC-2022-0002.html
- Report: github.com/xacrimon/dashmap/issues/167
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
Same cratedashmap: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?