GHSA-j8cj-hw74-64jv: Hivex Hive Has Double-free And Use Vulnerability

MODERATE
CWE-415 CWE-416
Published
Advisory Summary

GHSA-j8cj-hw74-64jv is a MODERATE hive has double-free and use vulnerability (CWE-415: Double Free) affecting Hivex libraries in the crates.io ecosystem. The issue involves hive has double-free and use after free vulnerabilities. Remediation is available by upgrading affected packages to version 0.2.1.

GHSA-j8cj-hw74-64jv at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-j8cj-hw74-64jv
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-415: Double Free
Affected Product Hivex
Package Ecosystem crates.io
Published Date
Last Updated

How to Fix GHSA-j8cj-hw74-64jv

To remediate this vulnerability, upgrade all affected Hivex dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

hivex fixed: 0.2.1
Upgrade hivex to 0.2.1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for hivex

How to Check if You Are Affected

To determine whether your application is affected by GHSA-j8cj-hw74-64jv, inspect your project dependencies for Hivex:

inspect dependencies for hivex

Analyze the terminal output to locate any version of Hivex in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.2.1), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-415: Double Free, where the product calls free() twice on the same memory address. In Hivex, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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

GHSA-j8cj-hw74-64jv Affected Hivex Versions

1 component(s)
Fixed Versions:
0.2.1
Product / Package Ecosystem Affected Versions Fixed Version
hivex
crates.io
≥ 0.2.0
< 0.2.1
All 1 versions
0.2.0
0.2.1

References

Frequently Asked Questions

What is GHSA-j8cj-hw74-64jv?
GHSA-j8cj-hw74-64jv is a security vulnerability in Hivex involving Hive has Double-free and Use After Free Vulnerabilities under CWE-415: Double Free.
Which Hivex versions are affected?
Affected versions include releases prior to 0.2.1 across affected packages: hivex.
What version fixes GHSA-j8cj-hw74-64jv?
Upgrading to 0.2.1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is hivex affected?
Yes, hivex is affected in releases prior to 0.2.1. Upgrade your dependency to 0.2.1 or later.
What CWE is associated with GHSA-j8cj-hw74-64jv?
GHSA-j8cj-hw74-64jv is classified under CWE-415: Double Free (The product calls free() twice on the same memory address.).
How can I check crates.io dependencies for GHSA-j8cj-hw74-64jv?
Run the dependency tree command: 'inspect dependencies for hivex'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j8cj-hw74-64jv",
  "modified" : "2026-02-28T02:48:45Z",
  "published" : "2026-02-28T02:48:45Z",
  "aliases" : [ ],
  "summary" : "Hive has Double-free and Use After Free Vulnerabilities",
  "details" : "`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.\n\nAdditionally, 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.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "hivex"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.2.0"
      }, {
        "fixed" : "0.2.1"
      } ]
    } ],
    "versions" : [ "0.2.0" ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://codeberg.org/1millibyte/toolsnt/commit/f4c7a0d1fc4a08ce40bb76e447a69a6f383a916e"
  }, {
    "type" : "WEB",
    "url" : "https://codeberg.org/1millibyte/toolsnt/issues/18"
  }, {
    "type" : "WEB",
    "url" : "https://docs.rs/crate/hivex"
  }, {
    "type" : "WEB",
    "url" : "https://docs.rs/crate/hivex/0.2.1/source"
  }, {
    "type" : "WEB",
    "url" : "https://rustsec.org/advisories/RUSTSEC-2026-0029.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-415", "CWE-416" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-02-28T02:48:45Z",
    "nvd_published_at" : null
  }
}