Skip to content

Critical Use-After-Free in Wasmi's Linear Memory

High severity GitHub Reviewed Published Dec 8, 2025 in wasmi-labs/wasmi • Updated Dec 9, 2025

Package

cargo wasmi (Rust)

Affected versions

>= 0.41.0, < 0.41.2
>= 0.42.0, < 0.47.1
>= 0.50.0, < 0.51.3
>= 1.0.0, < 1.0.1

Patched versions

0.41.2
0.47.1
0.51.3
1.0.1

Description

Summary

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

Impact

  • Confidentiality: High – attacker-controlled memory reads possible.
  • Integrity: High – memory corruption may allow arbitrary writes.
  • Availability: High – interpreter crashes possible.

Affected Versions

Wasmi v0.41.0 through Wasmi v1.0.0.

Workarounds

  • Upgrade to the latest patched version of Wasmi.
  • Consider limiting the maximum linear memory sizes where feasible.

Credits

This vulnerability was discovered by Robert T. Morris (RTM).

References

@Robbepop Robbepop published to wasmi-labs/wasmi Dec 8, 2025
Published to the GitHub Advisory Database Dec 8, 2025
Reviewed Dec 8, 2025
Published by the National Vulnerability Database Dec 9, 2025
Last updated Dec 9, 2025

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS score

Weaknesses

Use After Free

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. Learn more on MITRE.

CVE ID

CVE-2025-66627

GHSA ID

GHSA-g4v2-cjqp-rfmq

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.