CVE-2024-44073: Miniscript Miniscript Allows Stack Consumption Vulnerability

MODERATE
Advisory Identifier: GHSA-rv9v-r4vm-gj8x
CVSS 7.5
CWE-787 CWE-770 CWE-674
Published
Advisory Summary

CVE-2024-44073 is a MODERATE (CVSS 7.5) miniscript allows stack consumption vulnerability (CWE-787: Out-of-bounds Write) affecting Miniscript libraries in the crates.io ecosystem. The issue involves miniscript allows stack consumption. Remediation is available by upgrading affected packages to version 12.2.0, 11.2.0, 10.2.0, 9.2.0.

CVE-2024-44073 at a Glance

CVE Identifier CVE-2024-44073
GHSA Identifier GHSA-rv9v-r4vm-gj8x
Severity MODERATE
CVSS v3.1 Base Score 7.5
CWE Classification CWE-787: Out-of-bounds Write
Affected Product Miniscript
Package Ecosystem crates.io
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2024-44073

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

miniscript fixed: 12.2.0
Upgrade miniscript to 12.2.0
miniscript fixed: 11.2.0
Upgrade miniscript to 11.2.0
miniscript fixed: 10.2.0
Upgrade miniscript to 10.2.0
miniscript fixed: 9.2.0
Upgrade miniscript to 9.2.0
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 miniscript

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-44073, inspect your project dependencies for Miniscript:

inspect dependencies for miniscript

Analyze the terminal output to locate any version of Miniscript in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.2.0), 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-787: Out-of-bounds Write, where the product writes data past the end, or before the beginning, of the intended buffer. In Miniscript, 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

The Miniscript (aka rust-miniscript) library for Rust allows stack consumption because it does not properly track tree depth.

CVE-2024-44073 Affected Miniscript Versions

4 component(s)
Fixed Versions:
12.2.011.2.010.2.09.2.0
Product / Package Ecosystem Affected Versions Fixed Version
miniscript
crates.io
≥ 12.0.0
< 12.2.0
12.2.0
miniscript
crates.io
≥ 11.0.0
< 11.2.0
11.2.0
miniscript
crates.io
≥ 10.0.0
< 10.2.0
10.2.0
miniscript
crates.io
< 9.2.0
9.2.0

References

Frequently Asked Questions

What is CVE-2024-44073?
CVE-2024-44073 is a security vulnerability in Miniscript involving Miniscript allows stack consumption under CWE-787: Out-of-bounds Write.
Which Miniscript versions are affected?
Affected versions include releases prior to 12.2.0, 11.2.0, 10.2.0, 9.2.0 across affected packages: miniscript.
What version fixes CVE-2024-44073?
Upgrading to 12.2.0, 11.2.0, 10.2.0, 9.2.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is miniscript affected?
Yes, miniscript is affected in releases prior to 12.2.0, 11.2.0, 10.2.0, 9.2.0. Upgrade your dependency to 12.2.0, 11.2.0, 10.2.0, 9.2.0 or later.
What is the CVSS score of CVE-2024-44073?
CVE-2024-44073 has a CVSS v3.1 base score of 7.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2024-44073?
CVE-2024-44073 is classified under CWE-787: Out-of-bounds Write (The product writes data past the end, or before the beginning, of the intended buffer.).
How can I check crates.io dependencies for CVE-2024-44073?
Run the dependency tree command: 'inspect dependencies for miniscript'. 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-rv9v-r4vm-gj8x",
  "modified" : "2024-09-09T18:20:53Z",
  "published" : "2024-08-19T03:30:48Z",
  "aliases" : [ "CVE-2024-44073" ],
  "summary" : "Miniscript allows stack consumption",
  "details" : "The Miniscript (aka rust-miniscript) library for Rust allows stack consumption because it does not properly track tree depth.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:U"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "miniscript"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "12.0.0"
      }, {
        "fixed" : "12.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "miniscript"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.0.0"
      }, {
        "fixed" : "11.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "miniscript"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0"
      }, {
        "fixed" : "10.2.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "crates.io",
      "name" : "miniscript"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.2.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-44073"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-bitcoin/rust-miniscript/pull/704"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-bitcoin/rust-miniscript/pull/712"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-bitcoin/rust-miniscript/pull/712/files"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-bitcoin/rust-miniscript/pull/713/files"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-bitcoin/rust-miniscript/pull/714/files"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-bitcoin/rust-miniscript/pull/715/files"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-bitcoin/rust-miniscript/commit/5b0f5e3417f027a22b066debf825dbe6644b575b"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-bitcoin/rust-miniscript/commit/8f54b5e3fb7129ed9fbed53f1cb9e6e62ea4c151"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rust-bitcoin/rust-miniscript/compare/11.2.0...12.2.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-674", "CWE-770", "CWE-787" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-19T18:25:09Z",
    "nvd_published_at" : "2024-08-19T03:15:03Z"
  }
}