Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify ERC7984 wrapper holding high-supply token
-
DeliveryConfirm or contribute to wrapper filling to uint64 max
-
ExploitCall wrap() with any non-zero amount
-
ExecutionERC-20 transferFrom succeeds, tokens enter wrapper
-
Persist_mint overflows silently, no confidential tokens credited
-
ImpactCaller loses deposited underlying tokens permanently
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Integer overflow checks
MITRE ATT&CK
1 technique across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the targeted ERC7984ERC20Wrapper deployment to have already accumulated a total underlying token balance equivalent to approximately 18.4 trillion wrapped token units (type(uint64).max), which is the overflow threshold for the euint64 confidential supply counter. The wrapped ERC-20 token must therefore have a circulating or transferable supply large enough for a single wrapper instance to be filled to this threshold. Under the default rate() of 1, this means 18.4 trillion ERC-20 base units must be deposited before subsequent wrap calls silently lose funds. Wrappers using a higher rate() value reduce the effective unit count and thus require proportionally more underlying tokens to reach the threshold. No authentication is required - any account calling wrap() or triggering onTransferReceived() after the threshold is met becomes a victim. Wrappers holding tokens with sub-trillion total supply, or wrappers with a sufficiently high rate() override, are not practically at risk. |
| Impact | The CVSS 4.0 score of 6.6 (VI:H, all other impacts N) correctly characterises this as a fund-integrity issue with no confidentiality or availability dimension. The vector AV:N/AC:L/AT:N/PR:N/UI:N indicates the triggering transaction is network-accessible and requires no special privileges; however, the E:U supplemental tag confirms no active exploitation at time of scoring. The critical limiting factor - explicitly acknowledged by the vendor - is that the wrapper must first accumulate approximately 18.4 trillion units of the underlying token before the overflow threshold is reachable. The vendor states that very few tokens with sufficient total supply exist to fill the wrapper under default rate() settings, which substantially narrows the real-world attack surface. EPSS data was not provided in the input; given the experimental nature of the library, a low exploitation probability is inferred but not confirmed. No CISA KEV entry exists. For the small set of deployments that do wrap extremely high-supply tokens, the risk is material - a user will lose funds with no on-chain revert to alert them. For all other deployments, this is a medium-severity latent defect that warrants upgrading but does not represent an immediate crisis. |
| Exploit ScenarioDerived | A user interacts with an ERC7984ERC20Wrapper that has been used to wrap a high-supply token - such as a token with a circulating supply in the trillions - until the wrapper's confidential total supply counter approaches type(uint64).max (~18.4 trillion). Any subsequent call to wrap() or onTransferReceived() (e.g. via ERC-1363 transferAndCall) transfers the caller's underlying ERC-20 tokens into the wrapper contract, but the silent _mint overflow results in no confidential ERC7984 tokens being credited, permanently locking the deposited funds in the contract with no revert or error signal to the caller. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 13, 2026
Silent integer overflow in ERC7984ERC20Wrapper's confidential total supply counter allows fund loss when an fhEVM token wrapper is exhausted. In versions prior to 0.3.1, the wrap() and onTransferReceived() functions did not check whether the internal _mint call succeeded, meaning that once the euint64 supply counter reached its maximum (~18.4 trillion tokens), subsequent wrapping operations transferred the caller's underlying ERC-20 tokens into the contract while crediting no confidential wrapped tokens in return. No public exploit has been identified at time of analysis; a vendor-released patch is available in version 0.3.1.
RemediationAI
Upgrade to @openzeppelin/confidential-contracts version 0.3.1, which introduces the _checkConfidentialTotalSupply() guard that reverts with ERC7984TotalSupplyOverflow before any mint is attempted when totalSupply() (derived from the plaintext underlying balance) would exceed maxTotalSupply() (type(uint64).max). The fix commit is at https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/commit/c620d4386021dde63ae3ea1507dee8543791134a and the release is at https://github.com/OpenZeppelin/openzeppelin-confidential-contracts/releases/tag/v0.3.1. For teams unable to upgrade immediately, two partial mitigations exist: (1) override rate() to use a significantly higher conversion factor, which raises the underlying token threshold required before overflow, but does not eliminate the vulnerability and changes token economics; (2) add an off-chain or front-end gate that reads totalSupply() before submitting wrap transactions and rejects calls when supply approaches type(uint64).max, though this provides no on-chain guarantee. Neither workaround replaces the patch.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in npm, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
OpenZeppelin Confidential Contracts is an experimental Solidity library for building applications on Zama's fhEVM (Fully Homomorphic Encryption EVM), which tracks token balances and supply as FHE ciphertexts (euint64). The affected contract, ERC7984ERC20Wrapper (contracts/token/ERC7984/extensions/ERC7984ERC20Wrapper.sol), wraps a plaintext ERC-20 token into a confidential ERC7984 token by custodying the underlying asset and minting an encrypted equivalent. The root cause is CWE-190 (Integer Overflow): the internal _mint function silently fails rather than reverting when incrementing the euint64 total supply would exceed type(uint64).max. Because FHE arithmetic operates on ciphertexts, overflow cannot be detected mid-computation in the usual revert-on-overflow manner without explicit checks. The wrap() and onTransferReceived() callers never inspected whether _mint succeeded, so the ERC-20 transferFrom completed and tokens entered the contract while the confidential credit was silently dropped. The fix introduced a _checkConfidentialTotalSupply() function comparing the plaintext underlying balance divided by rate() against type(uint64).max, reverting with ERC7984TotalSupplyOverflow before any mint is attempted.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:U
AC:H reflects the hard prerequisite that the wrapper must be filled to ~18.4T tokens; C and A are N as only deposited fund integrity is impacted.
Primary rating from Vendor (github).
CVSS VectorVendor: github
Lifecycle Timeline
1DescriptionCVE.org
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.
Blast Radius
ecosystem impact- 3 npm packages depend on @openzeppelin/confidential-contracts (3 direct, 0 indirect)
Ecosystem-wide dependent count for version 0.3.1.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Integer overflow occurs when an arithmetic operation produces a result that exceeds the maximum value a given integer type can store.
EUVD-2026-58188
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB