GHSA-hqf9-8xv5-x8xw — @openzeppelin/confidentia…
GHSA-hqf9-8xv5-x8xw is a CWE-190 vulnerability in @openzeppelin/confidential-contracts. A fix is available for @openzeppelin/confidential-contracts — see the affected versions and patch details below.
ERC7984ERC20Wrapper: once a wrapper is filled, subsequent wrap requests do not revert and result in loss of funds.
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-hqf9-8xv5-x8xw.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
@openzeppelin/confidential-contractsnpmDescription
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.
Patches
This issue has been patched in the 0.3.1 release.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | @openzeppelin/confidential-contracts | all versions | 0.3.1npm install @openzeppelin/confidential-contracts@0.3.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @openzeppelin/confidential-contracts, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update @openzeppelin/confidential-contracts to 0.3.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-hqf9-8xv5-x8xw is resolved across your whole dependency graph.
Workarounds
Constrain what reaches the vulnerable code: limit the size and shape of untrusted input, isolate the affected component in a sandboxed or least-privileged process, and enable the platform's memory-safety mitigations (ASLR, stack protector, hardened allocator) so an out-of-bounds access is more likely to fail closed than to be exploitable.
Frequently Asked Questions
Is GHSA-hqf9-8xv5-x8xw in your dependencies?
Find it across npm, including transitive dependencies.