CWE-415: Double Free
VariantLikelihood of exploit: High
The product calls free() twice on the same memory address.
Consequences
- Integrity, Confidentiality, Availability: Modify Memory, Execute Unauthorized Code or Commands
How to prevent it
- Architecture and Design: Choose a language that provides automatic memory management.
- Implementation: Ensure that each allocation is freed only once. After freeing a chunk, set the pointer to NULL to ensure the pointer cannot be freed again. In complicated error conditions, be sure that clean-up routines respect the state of allocation properly. If the language is object oriented, ensure that object destructors delete each chunk of memory only once.
- Implementation: Use a static analysis tool to find double free instances.
Recent advisories
- GO-2026-4981 — Crash when handling long CNAME response in net
- GHSA-vfvv-c25p-m7mm — rkyv: Panic safety bugs in `InlineVec::clear` and `SerVec::clear` enable arbitrary code execution
- CVE-2026-33824 — Double free in Windows IKE Extension allows an unauthorized attacker to execute code over a network.
- CVE-2025-62215 — Concurrent execution using shared resource with improper synchronization ('race condition') in Windows Kernel allows an authorized attacker to elevate…
- GHSA-7mcq-f592-pf7v — Slice Ring Buffer and Slice Deque contains four unique double-free vulnerabilities triggered through safe APIs
- GHSA-pg9f-39pc-qf8g — crossbeam-channel Vulnerable to Double Free on Drop
- GHSA-f49c-87jh-g47q — TensorFlow has double free in Fractional(Max/Avg)Pool
- GHSA-v5w6-wcm8-jm4q — openssl-src contains Double free after calling `PEM_read_bio_ex`
- CVE-2021-22600 — A double free bug in packet_set_ring() in net/packet/af_packet.c can be exploited by a local user through crafted syscalls to escalate privileges or deny…
- GHSA-cvhw-2593-5j2q — Double Free in OpenCV
- GHSA-m7fm-4jfh-jrg6 — Use after free in boosted trees creation
- GHSA-p9gf-gmfv-398m — Double free in slice-deque
- GHSA-c8hq-x4mm-p6q6 — Memory handling issues in xcb
- CVE-2020-9859 — A memory consumption issue was addressed with improved memory handling.
- GHSA-mm7v-vpv8-xfc3 — Double free in smallvec
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor