CVE-2025-66627: Wasmi Critical Use-After-Free Vulnerability
HIGHCVE-2025-66627 is a HIGH (CVSS 8.4) critical use-after-free vulnerability (CWE-416: Use After Free) affecting Wasmi libraries in the crates.io ecosystem. The issue involves critical use-after-free in wasmi's linear memory. Remediation is available by upgrading affected packages to version 0.41.2, 0.47.1, 0.51.3, 1.0.1.
CVE-2025-66627 at a Glance
Security Impact
CVSS: 8.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-66627
To remediate this vulnerability, upgrade all affected Wasmi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade wasmi to 0.41.2
Upgrade wasmi to 0.47.1
Upgrade wasmi to 0.51.3
Upgrade wasmi to 1.0.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for wasmi
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-66627, inspect your project dependencies for Wasmi:
inspect dependencies for wasmi
Analyze the terminal output to locate any version of Wasmi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.41.2), 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-416: Use After Free, where the product reuses or references memory after it has been freed. at some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. any operations using the original pointer are no longer valid because the memory "belongs" to the code that operates on the new pointer. In Wasmi, 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
CVE-2025-66627 Affected Wasmi Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
wasmi
|
crates.io |
≥ 0.41.0
< 0.41.2
|
0.41.2
|
|
wasmi
|
crates.io |
≥ 0.42.0
< 0.47.1
|
0.47.1
|
|
wasmi
|
crates.io |
≥ 0.50.0
< 0.51.3
|
0.51.3
|
|
wasmi
|
crates.io |
≥ 1.0.0
< 1.0.1
|
1.0.1
|
References
Frequently Asked Questions
What is CVE-2025-66627?
Which Wasmi versions are affected?
What version fixes CVE-2025-66627?
Is wasmi affected?
What is the CVSS score of CVE-2025-66627?
What CWE is associated with CVE-2025-66627?
How can I check crates.io dependencies for CVE-2025-66627?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g4v2-cjqp-rfmq",
"modified" : "2025-12-09T19:17:35Z",
"published" : "2025-12-08T22:15:49Z",
"aliases" : [ "CVE-2025-66627" ],
"summary" : "Critical Use-After-Free in Wasmi's Linear Memory",
"details" : "### Summary\n\nA use-after-free vulnerability has been discovered in the linear memory implementation of Wasmi. This issue can be triggered by a WebAssembly module under certain memory growth conditions, potentially leading to memory corruption, information disclosure, or code execution.\n\n### Impact\n\n- **Confidentiality:** High – attacker-controlled memory reads possible.\n- **Integrity:** High – memory corruption may allow arbitrary writes.\n- **Availability:** High – interpreter crashes possible.\n\n### Affected Versions\n\nWasmi `v0.41.0` through Wasmi `v1.0.0`.\n\n### Workarounds\n\n- Upgrade to the latest patched version of Wasmi.\n- Consider limiting the maximum linear memory sizes where feasible.\n\n### Credits\n\nThis vulnerability was discovered by **Robert T. Morris (RTM)**.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.41.0"
}, {
"fixed" : "0.41.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.42.0"
}, {
"fixed" : "0.47.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.50.0"
}, {
"fixed" : "0.51.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "wasmi"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "1.0.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/wasmi-labs/wasmi/security/advisories/GHSA-g4v2-cjqp-rfmq"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-66627"
}, {
"type" : "WEB",
"url" : "https://github.com/wasmi-labs/wasmi/commit/0e6f0d2a8325602c58d6a53ce1c0e6045eb6a490"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/wasmi-labs/wasmi"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-416" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-12-08T22:15:49Z",
"nvd_published_at" : "2025-12-09T16:18:21Z"
}
}