CVE-2021-29940: Double free in through
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.65141%
CWE
Published
8/25/2021
Updated
1/9/2023
KEV Status
No
Technology
Rust
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
through | rust | <= 0.1.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The advisory explicitly names both through() and through_and() as vulnerable entry points. The root cause is their use of ptr::read to create duplicate ownership without proper panic safety guards. When the user-provided closure panics, both the original value and the ptr::read copy get dropped. The reproduction example demonstrates this with through::through, and the advisory confirms the same pattern exists in through_and. The file path is inferred as src/lib.rs as this is the standard entry point for Rust crates.