GHSA-2pgj-5cv2-6xxw: Fuel vm FuelVM Is Vulnerable To Heap Vulnerability
HIGHGHSA-2pgj-5cv2-6xxw is a HIGH fuelvm is vulnerable to heap vulnerability (CWE-416: Use After Free) affecting Fuel vm libraries in the crates.io ecosystem. The issue involves fuelvm is vulnerable to heap memory allocation re-use bug. Remediation is available by upgrading affected packages to version 0.59.3, 0.60.1.
GHSA-2pgj-5cv2-6xxw at a Glance
How to Fix GHSA-2pgj-5cv2-6xxw
To remediate this vulnerability, upgrade all affected Fuel vm 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 fuel-vm to 0.59.3
Upgrade fuel-vm to 0.60.1
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for fuel-vm
How to Check if You Are Affected
To determine whether your application is affected by GHSA-2pgj-5cv2-6xxw, inspect your project dependencies for Fuel vm:
inspect dependencies for fuel-vm
Analyze the terminal output to locate any version of Fuel vm in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.59.3), 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 Fuel vm, 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
GHSA-2pgj-5cv2-6xxw Affected Fuel vm Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
fuel-vm
|
crates.io |
< 0.59.3
|
0.59.3
|
|
fuel-vm
|
crates.io |
≥ 0.60.0
< 0.60.1
|
0.60.1
|
References
Frequently Asked Questions
What is GHSA-2pgj-5cv2-6xxw?
Which Fuel vm versions are affected?
What version fixes GHSA-2pgj-5cv2-6xxw?
Is fuel-vm affected?
What CWE is associated with GHSA-2pgj-5cv2-6xxw?
How can I check crates.io dependencies for GHSA-2pgj-5cv2-6xxw?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-2pgj-5cv2-6xxw",
"modified" : "2025-10-08T12:43:30Z",
"published" : "2025-10-08T12:43:30Z",
"aliases" : [ ],
"summary" : "FuelVM is vulnerable to heap memory allocation re-use bug",
"details" : "### Impact\n\nA memory safety vulnerability was present in the Fuel Virtual Machine (FuelVM), where memory reads could bypass expected access controls. Specifically, when a smart contract performed a `mload` (or other opcodes which access memory) on memory that had been deallocated using `ret`, it was still able to access the old memory contents. This occurred because the memory region was not zeroed out or otherwise marked as invalid. As a result, smart contracts could potentially read sensitive data left over from other contracts if the same memory was reallocated, violating isolation guarantees between contracts and enabling unintended data leakage.\n\nAll users running affected versions of FuelVM that relied on strict memory isolation between smart contracts were impacted.\n\n### Patches\n\nThe vulnerability was patched by modifying the FuelVM to ensure that memory deallocated with `ret` was zeroed out or made inaccessible. The fix was included in FuelVM version `v0.60.1` and back-ported to `v0.59.3`. This patch was released to the Fuel network on Friday, April 18th, 2025.\n\n### Workarounds\n\nThere were no reliable workarounds that fully mitigated the vulnerability. While developers could manually zero out sensitive memory regions before returning from a function, this approach was error-prone and could not be enforced at the VM level. Upgrading to a patched version remained the recommended course of action.\n\n### References\n\n- Fix implemented in the FuelVM GitHub repository (https://github.com/FuelLabs/fuel-vm/pull/941)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "crates.io",
"name" : "fuel-vm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.59.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "crates.io",
"name" : "fuel-vm"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0.60.0"
}, {
"fixed" : "0.60.1"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/FuelLabs/fuel-vm/security/advisories/GHSA-2pgj-5cv2-6xxw"
}, {
"type" : "WEB",
"url" : "https://github.com/FuelLabs/fuel-vm/pull/941"
}, {
"type" : "WEB",
"url" : "https://github.com/FuelLabs/fuel-vm/commit/9c97c2bf782626b35ba48e154f210f91c847a513"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/FuelLabs/fuel-vm"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-416" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2025-10-08T12:43:30Z",
"nvd_published_at" : null
}
}