CyberRota Analysis
AI-GeneratedThe OpenZeppelin Confidential Contracts library, prior to version 0.3.1, contains a vulnerability in the ERC7984 contract where an overflowing internal _mint operation could fail silently, leading to potential loss of funds during token transfers. Specifically, the wrap and onTransferReceived functions do not properly handle this failure, allowing users to transfer tokens without receiving the corresponding wrapped tokens after approximately 18.4 trillion tokens. Organizations utilizing this library should prioritize upgrading to version 0.3.1 to mitigate the risk of financial loss.
Public Exploit Signal
A public exploit, PoC, GitHub repository or Metasploit reference was detected for this CVE.
Note: these links are listed for security research and verification purposes only.
Original NVD Description
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.