# GHSA-qm2p-4w45-v2vr: grcov has an out of bounds write triggered by crafted coverage data

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2025-01-13T12:00:00.000Z
- Modified: 2025-10-28T06:29:25.945Z
- Also known as: RUSTSEC-2025-0005
- Weaknesses: CWE-787

## 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.

(As written by GitHub Advisory Database.)

## Affected

- grcov (crates.io): before 0.8.20; from 0.0.0-0 before 0.8.21-0

## References

- <https://github.com/mozilla/grcov/commit/c8219563bc91615dd4a27884a5c63f09db8d03bb> (web)
- <https://bugzilla.mozilla.org/show_bug.cgi?id=1917475> (web)
- <https://github.com/mozilla/grcov> (package)
- <https://rustsec.org/advisories/RUSTSEC-2025-0005.html> (advisory, web)
- <https://crates.io/crates/grcov> (package)

## Sources

- GitHub Advisory Database: [GHSA-qm2p-4w45-v2vr](https://github.com/advisories/GHSA-qm2p-4w45-v2vr), CC-BY-4.0, modified 2025-10-28
- RustSec Advisory Database: [RUSTSEC-2025-0005](https://rustsec.org/advisories/RUSTSEC-2025-0005.html), CC0-1.0, modified 2025-10-28

---

Page: https://cve.day/GHSA-qm2p-4w45-v2vr · Whole record: https://cve.day/GHSA-qm2p-4w45-v2vr.json · Rebuilt by cve.day 2026-11-25T22:56:43.245Z
