GHSA-hqf9-8xv5-x8xw

Suggest an improvement
Source
https://github.com/advisories/GHSA-hqf9-8xv5-x8xw
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-hqf9-8xv5-x8xw/GHSA-hqf9-8xv5-x8xw.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-hqf9-8xv5-x8xw
Aliases
Published
2026-01-05T19:57:46Z
Modified
2026-08-13T18:51:16Z
Severity
  • 6.6 (Medium) CVSS_V4 - 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 CVSS Calculator
Summary
ERC7984ERC20Wrapper: once a wrapper is filled, subsequent wrap requests do not revert and result in loss of funds.
Details

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.

Database specific
{
    "cwe_ids":  [
        "CWE-190"
    ],
    "github_reviewed":  true,
    "github_reviewed_at":  "2026-01-05T19:57:46Z",
    "nvd_published_at":  null,
    "severity":  "MODERATE"
}
References

Affected packages

npm / @openzeppelin/confidential-contracts

Package

Name
@openzeppelin/confidential-contracts
View open source insights on deps.dev
Purl
pkg:npm/%40openzeppelin/confidential-contracts

Affected ranges

Type
SEMVER
Events
Introduced
0 Unknown introduced version / All previous versions are affected
Fixed
0.3.1

Database specific

last_known_affected_version_range
"<= 0.3.0"
source
"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-hqf9-8xv5-x8xw/GHSA-hqf9-8xv5-x8xw.json"