# GHSA-J8CJ-HW74-64JV: Hive has Double-free and Use After Free Vulnerabilities

- Database: GitHub
- Severity: medium (stated by ghsa, no CVSS score)
- Published: 2026-02-28
- Modified: 2026-03-01

## Also published as

- [RUSTSEC-2026-0029](https://cve.now/RUSTSEC-2026-0029.md) (RustSec)

## Affected versions

- hivex (crates.io): from 0.2.0, fixed in 0.2.1

## Description

`Drop` implementation for `Hive` did perform free, but so did `Hive::close`, which, at the end of the scope performed `Drop`, therefore triggering double-free.

Additionally, function `Hive::from_handle` was not marked as unsafe, making it, in combination with `as_handle` easy to clone and trigger double-free in safe code or triggering UB when using invalid pointer.

## References

- https://codeberg.org/1millibyte/toolsnt/commit/f4c7a0d1fc4a08ce40bb76e447a69a6f383a916e
- https://codeberg.org/1millibyte/toolsnt/issues/18
- https://docs.rs/crate/hivex
- https://docs.rs/crate/hivex/0.2.1/source
- https://rustsec.org/advisories/RUSTSEC-2026-0029.html

Page: https://cve.now/GHSA-J8CJ-HW74-64JV

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