# GHSA-j8cj-hw74-64jv: Hive has Double-free and Use After Free Vulnerabilities

- Severity: Medium (rating, scored by GitHub)
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2026-02-26T12:00:00.000Z
- Modified: 2026-03-01T06:11:19.337Z
- Also known as: RUSTSEC-2026-0029
- Weaknesses: CWE-415, CWE-416

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

(As written by GitHub Advisory Database.)

## Affected

- hivex (crates.io): from 0.2.0 before 0.2.1; from 0.0.0-0 before 0.2.1

## References

- <https://codeberg.org/1millibyte/toolsnt/commit/f4c7a0d1fc4a08ce40bb76e447a69a6f383a916e> (web)
- <https://codeberg.org/1millibyte/toolsnt/issues/18> (web)
- <https://docs.rs/crate/hivex> (web)
- <https://docs.rs/crate/hivex/0.2.1/source> (web)
- <https://rustsec.org/advisories/RUSTSEC-2026-0029.html> (advisory, web)
- <https://crates.io/crates/hivex> (package)

## Sources

- GitHub Advisory Database: [GHSA-j8cj-hw74-64jv](https://github.com/advisories/GHSA-j8cj-hw74-64jv), CC-BY-4.0, modified 2026-03-01
- RustSec Advisory Database: [RUSTSEC-2026-0029](https://rustsec.org/advisories/RUSTSEC-2026-0029.html), CC0-1.0, modified 2026-03-01

---

Page: https://cve.day/GHSA-j8cj-hw74-64jv · Whole record: https://cve.day/GHSA-j8cj-hw74-64jv.json · Rebuilt by cve.day 2026-11-25T22:56:43.310Z
