# RUSTSEC-2025-0005: Out of bounds write triggered by crafted coverage data

- Database: RustSec
- Published: 2025-01-13
- Modified: 2025-10-28

## Also published as

- [GHSA-QM2P-4W45-V2VR](https://cve.now/GHSA-QM2P-4W45-V2VR.md) (GitHub)

## Affected versions

- grcov (crates.io): fixed in 0.8.21-0

## Description

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

- https://crates.io/crates/grcov
- https://rustsec.org/advisories/RUSTSEC-2025-0005.html
- https://bugzilla.mozilla.org/show_bug.cgi?id=1917475

Page: https://cve.now/RUSTSEC-2025-0005

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
