Vulnerability MediumRUSTSEC-2025-0047 · slab
RUSTSEC-2025-0047: Out-of-bounds access in `get_disjoint_mut` due to incorrect bounds check
Short answerA security vulnerability in the slab crate: Out-of-bounds access in `get_disjoint_mut` due to incorrect bounds check. GitHub rates it Medium. Fixed in 0.4.11: update to a fixed version.
| Crate | slab |
|---|---|
| Type | Vulnerability |
| Affected versions | From 0.4.10 before 0.4.11. |
| Fixed in | 0.4.11 |
| Severity | Medium (GitHub rating) |
| Published | 2025-08-12 |
| Last changed | 2026-10-12 |
| Also known as | CVE-2025-55159, GHSA-qx2v-8332-m4fv |
| Affected functions | slab::Slab::get_disjoint_mut |
What to do
- See which version you have:
cargo tree -i slab(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p slab. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for exampleslab = "0.4.11") 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
Impact
The get_disjoint_mut method in slab v0.4.10 incorrectly checked if indices were within the slab's capacity instead of its length, allowing access to uninitialized memory. This could lead to undefined behavior or potential crashes.
Patches
This has been fixed in slab v0.4.11.
Workarounds
Avoid using get_disjoint_mut with indices that might be beyond the slab's actual length, or upgrade to v0.4.11 or later.
References
References
- Package: crates.io/crates/slab
- Advisory: rustsec.org/advisories/RUSTSEC-2025-0047.html
- Web: github.com/tokio-rs/slab/pull/152
- Web: github.com/tokio-rs/slab/pull/152
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 crateslab: security historyEvery advisory for this crate, and whether it is safe to use today.Read it next →Did this answer your question?