Skip to content
OpenAdvisories
Medium GHSA-qm2p-4w45-v2vr RUSTSEC-2025-0005

grcov has an out of bounds write triggered by crafted coverage data

Published Feb 10, 2025 · Updated Oct 28, 2025 · Assigned by GHSA

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.

Affected packages

EcosystemPackageAffectedFixedRecord
crates.io grcov < 0.8.20 0.8.20 GHSA-qm2p-4w45-v2vr
crates.io grcov >= 0.0.0-0, < 0.8.21-0 0.8.21-0 RUSTSEC-2025-0005

References