CVE-2026-73645 in Confidential Contracts
Summary
by MITRE • 08/13/2026
OpenZeppelin Confidential Contracts is an experimental library for developing applications on the Zama fhEVM. Prior to 0.3.1, the ERC7984 contract tracked confidential total supply with an euint64 value, and an overflowing internal _mint operation could fail silently. The wrap and onTransferReceived functions in contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol did not handle that failure, so a user could transfer the underlying token without receiving the corresponding confidential wrapped token. With the default rate(), the wrapper fills after approximately 18.4 trillion tokens, and subsequent wrapping requests can cause loss of funds. This issue is fixed in version 0.3.1.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 08/13/2026
The vulnerability resides within OpenZeppelin Confidential Contracts library version 0.3.0 and earlier, specifically affecting the ERC7984 contract implementation designed for Zama's fhEVM environment. This experimental library enables confidential smart contract development through encrypted computations while maintaining standard token interfaces. The core flaw manifests in how the contract tracks confidential total supply using an euint64 data type, which has a limited range of 2^64-1 elements. When the internal _mint operation encounters overflow conditions beyond this capacity, it fails silently without proper error propagation or exception handling mechanisms.
The operational impact becomes particularly severe when examining the ERC7984ERC20Wrapper.sol extension contract that implements wrap and onTransferReceived functions. These functions fail to adequately check for mint operation failures during the wrapping process, creating a critical security gap where users can transfer underlying tokens without receiving their corresponding confidential wrapped token equivalents. This silent failure mode represents a fundamental breakdown in atomicity guarantees and asset reconciliation mechanisms essential for token wrapper contracts.
The mathematical constraints of this vulnerability become apparent when considering the default rate() function implementation, which causes the wrapper contract to reach its maximum capacity after approximately 18.4 trillion tokens have been processed through the system. Beyond this threshold, any subsequent wrapping requests will trigger the silent overflow conditions that were not properly handled by the original implementation. This creates a scenario where legitimate users can lose access to their wrapped token balances while the underlying assets remain in the system, effectively resulting in permanent fund loss.
From a cybersecurity perspective, this vulnerability aligns with CWE-191 (Integer Underflow/Overflow) and CWE-704 (Incorrect Type Conversion or Cast) categories, as it involves improper handling of integer overflow conditions within cryptographic contexts. The issue also maps to ATT&CK technique T1566.001 (Phishing: Spearphishing Attachment) in scenarios where attackers might exploit this vulnerability to create misleading token wrapping operations that appear legitimate but silently fail to properly mint wrapped tokens.
The fix implemented in version 0.3.1 addresses these concerns by ensuring proper error handling throughout the minting and wrapping processes, particularly focusing on validating return codes from internal operations before proceeding with subsequent token management functions. Additionally, the updated implementation likely incorporates more robust overflow detection mechanisms that prevent silent failures and ensure that all state transitions maintain cryptographic integrity and atomicity properties essential for confidential computing environments.
This vulnerability demonstrates the critical importance of proper error handling in cryptographic systems where silent failures can lead to irreversible financial losses. The issue highlights the need for comprehensive testing strategies that consider boundary conditions and overflow scenarios, particularly when dealing with limited integer types in confidential computing contexts where traditional debugging approaches may be insufficient for detecting such subtle failures. Organizations utilizing confidential smart contracts should prioritize updating to version 0.3.1 or later to ensure proper handling of token wrapping operations and maintain the integrity of their encrypted asset management systems.