Summary
FuelVM is vulnerable to heap memory allocation re-use bug
Workarounds
There 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.
References
- Fix implemented in the FuelVM GitHub repository (https://github.com/FuelLabs/fuel-vm/pull/941)
Impact
A 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.
All users running affected versions of FuelVM that relied on strict memory isolation between smart contracts were impacted.
Memory is accessed after it has been freed, leading to undefined behavior in native code. Typical impact: memory corruption, crash, or potential code execution.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
The 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.
Frequently Asked Questions
- What is GHSA-2PGJ-5CV2-6XXW? GHSA-2PGJ-5CV2-6XXW is a high-severity use after free vulnerability in fuel-vm (rust), affecting versions < 0.59.3. It is fixed in 0.59.3, 0.60.1. Memory is accessed after it has been freed, leading to undefined behavior in native code.
- Which versions of fuel-vm are affected by GHSA-2PGJ-5CV2-6XXW? fuel-vm (rust) versions < 0.59.3 is affected.
- Is there a fix for GHSA-2PGJ-5CV2-6XXW? Yes. GHSA-2PGJ-5CV2-6XXW is fixed in 0.59.3, 0.60.1. Upgrade to this version or later.
- Is GHSA-2PGJ-5CV2-6XXW exploitable, and should I be worried? Whether GHSA-2PGJ-5CV2-6XXW is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether GHSA-2PGJ-5CV2-6XXW is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix GHSA-2PGJ-5CV2-6XXW?
- Upgrade
fuel-vmto 0.59.3 or later - Upgrade
fuel-vmto 0.60.1 or later
- Upgrade