Rust advisories / grcov
Vulnerability MediumRUSTSEC-2025-0005 · grcov
RUSTSEC-2025-0005: Out of bounds write triggered by crafted coverage data
Short answerA security vulnerability in the grcov crate: Out of bounds write triggered by crafted coverage data. GitHub rates it Medium. Fixed in 0.8.21: update to a fixed version.
| Crate | grcov |
|---|---|
| Type | Vulnerability (memory-corruption) |
| Affected versions | Before 0.8.21. |
| Fixed in | 0.8.21 |
| Severity | Medium (GitHub rating) |
| Published | 2025-01-13 |
| Last changed | 2025-10-28 |
| Also known as | GHSA-qm2p-4w45-v2vr |
| Affected functions | grcov::covdir::get_coverage |
What to do
- See which version you have:
cargo tree -i grcov(it also shows which of your dependencies pulls it in). - Update within your version requirement:
cargo update -p grcov. If the fix is a newer major or minor than your requirement allows, raise it in Cargo.toml (for examplegrcov = "0.8.21") 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
Function grcov::covdir::get_coverage uses the unsafe function get_unchecked_mut without validating that the index is in bounds.
This results in memory corruption, and could potentially allow arbitrary code execution provided that an attacker can feed the tool crafted coverage data.
References
- Package: crates.io/crates/grcov
- Advisory: rustsec.org/advisories/RUSTSEC-2025-0005.html
- Web: bugzilla.mozilla.org/show_bug.cgi?id=1917475
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?