ERC7984ERC20Wrapper: once a wrapper is filled, subsequent wrap requests do not revert and result in loss of funds.
Moderate severity
GitHub Reviewed
Published
Jan 5, 2026
in
OpenZeppelin/openzeppelin-confidential-contracts
•
Updated Jan 5, 2026
Package
Affected versions
<= 0.3.0
Patched versions
0.3.1
Description
Published to the GitHub Advisory Database
Jan 5, 2026
Reviewed
Jan 5, 2026
Last updated
Jan 5, 2026
Impact
The
ERC7984contract tracks total supply using a confidentialeuint64value. If a call to the internal_mintfunction would result in the total supply overflowing, the call fails silently. ThewrapandonTransferReceivedfunctions inERC7984ERC20Wrapperassume that_mintwon't fail silently and do not check the return value. If the mint function fails silently, users do not receive the confidential wrapped token but still send the underlying token, resulting in a loss of funds.By default (without overriding
rate(), the wrapper fills up after wrapping ~18.4 trillion tokens. There are very few tokens of value with sufficient total supply to result in the filling of the wrapper. That said, we recommend upgrading to0.3.1to remove this issue.Patches
This issue has been patched in the
0.3.1release.References