Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

ERC1155Supply vulnerability in OpenZeppelin ContractsGHSA-wmpv-c2jp-j2xg

GHSA-wmpv-c2jp-j2xg is a security vulnerability in @openzeppelin/contracts. A fix is available for @openzeppelin/contracts — see the affected versions and patch details below.

Published
Updated
Affected
2 pkgs
Patched
2 / 2
Exploits
None indexed
Exploitation data as of Nov 15, 2021 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

2 pkgs affected

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.

4Kother npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@openzeppelin/contractsnpm
936Kdownloads / week
@openzeppelin/contracts-upgradeablenpm
244Kdownloads / week

Description

When ERC1155 tokens are minted, a callback is invoked on the receiver of those tokens, as required by the spec. When including the ERC1155Supply extension, total supply is not updated until after the callback, thus during the callback the reported total supply is lower than the real number of tokens in circulation.

Impact

If a system relies on accurately reported supply, an attacker may be able to mint tokens and invoke that system after receiving the token balance but before the supply is updated.

Patches

A fix is included in version 4.3.3 of @openzeppelin/contracts and @openzeppelin/contracts-upgradeable.

Workarounds

If accurate supply is relevant, do not mint tokens to untrusted receivers.

Credits

The issue was identified and reported by @ChainSecurityAudits.

For more information

Read TotalSupply Inconsistency in ERC1155 NFT Tokens by @ChainSecurityAudits for a more detailed breakdown.

If you have any questions or comments about this advisory, email us at [email protected].

Affected Packages

2 total 2 fixed
EcosystemPackageVulnerable rangeFix
📦npm@openzeppelin/contracts≥ 4.2.0&&< 4.3.34.3.3npm install @openzeppelin/contracts@4.3.3
📦npm@openzeppelin/contracts-upgradeable≥ 4.2.0&&< 4.3.34.3.3npm install @openzeppelin/contracts-upgradeable@4.3.3

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @openzeppelin/contracts, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @openzeppelin/contracts to 4.3.3 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-wmpv-c2jp-j2xg is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

Frequently Asked Questions

When ERC1155 tokens are minted, a callback is invoked on the receiver of those tokens, as required by the spec. When including the `ERC1155Supply` extension, total supply is not updated until after the callback, thus during the callback the reported total supply is lower than the real number of tokens in circulation. ### Impact If a system relies on accurately reported supply, an attacker may be able to mint tokens and invoke that system after receiving the token balance but before the supply is updated. ### Patches A fix is included in version 4.3.3 of `@openzeppelin/contracts` and `@openze
O3 Security · Impact-Aware SCA

Is GHSA-wmpv-c2jp-j2xg in your dependencies?

Find it across npm, including transitive dependencies.

ERC1155Supply vulnerability in OpenZeppelin Contracts