Summary
ERC7984ERC20Wrapper: once a wrapper is filled, subsequent wrap requests do not revert and result in loss of funds.
Impact
The ERC7984 contract tracks total supply using a confidential euint64 value. If a call to the internal _mint function would result in the total supply overflowing, the call fails silently. The wrap and onTransferReceived functions in ERC7984ERC20Wrapper assume that _mint won'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 to 0.3.1 to remove this issue.
An arithmetic operation produces a value that exceeds the integer type's maximum, causing it to wrap to an unexpected small value. Typical impact: incorrect size calculations leading to heap overflows or logic errors.
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
This issue has been patched in the 0.3.1 release.
Frequently Asked Questions
- What is GHSA-HQF9-8XV5-X8XW? GHSA-HQF9-8XV5-X8XW is a medium-severity integer overflow or wraparound vulnerability in @openzeppelin/confidential-contracts (npm), affecting versions <= 0.3.0. It is fixed in 0.3.1. An arithmetic operation produces a value that exceeds the integer type's maximum, causing it to wrap to an unexpected small value.
- Which versions of @openzeppelin/confidential-contracts are affected by GHSA-HQF9-8XV5-X8XW? @openzeppelin/confidential-contracts (npm) versions <= 0.3.0 is affected.
- Is there a fix for GHSA-HQF9-8XV5-X8XW? Yes. GHSA-HQF9-8XV5-X8XW is fixed in 0.3.1. Upgrade to this version or later.
- Is GHSA-HQF9-8XV5-X8XW exploitable, and should I be worried? Whether GHSA-HQF9-8XV5-X8XW 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-HQF9-8XV5-X8XW 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-HQF9-8XV5-X8XW? Upgrade
@openzeppelin/confidential-contractsto 0.3.1 or later.