Read the docs
TI-2021-22737 Aliases GHSA-wmpv-c2jp-j2xg

ERC1155Supply vulnerability in OpenZeppelin Contracts

Priority LOW 38Published · Updated

Key facts

Attack vector
—
Privileges required
—
User interaction
—
Attack complexity
—
Impact type
—
Confidentiality · integrity · availability
—
Fix status
Fixed

No CVSS vector from any source. Fix status from GitHub.

Summary

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](https://medium.com/chainsecurity/totalsupply-inconsistency-in-erc1155-nft-tokens-8f8e3b29f5aa) by @ChainSecurityAudits for a more detailed breakdown. If you have any questions or comments about this advisory, email us at [email protected].

Why it matters now

Fix Fixed @openzeppelin/contracts (npm): 4.3.3@openzeppelin/contracts-upgradeable (npm): 4.3.3

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
—@openzeppelin/contracts (npm)4.2.0 to before 4.3.34.3.3Patch availableGHSA-wmpv-c2jp-j2xg
—@openzeppelin/contracts-upgradeable (npm)4.2.0 to before 4.3.34.3.3Patch availableGHSA-wmpv-c2jp-j2xg
  • @openzeppelin/contracts (npm) Vendor— Affected 4.2.0 to before 4.3.3 Fixed in 4.3.3 Patch available GHSA-wmpv-c2jp-j2xg
  • @openzeppelin/contracts-upgradeable (npm) Vendor— Affected 4.2.0 to before 4.3.3 Fixed in 4.3.3 Patch available GHSA-wmpv-c2jp-j2xg

Remediation

  • Fix · GHSA-wmpv-c2jp-j2xg @openzeppelin/contracts (npm) Fixed in 4.3.3 Advisory →
  • Fix · GHSA-wmpv-c2jp-j2xg @openzeppelin/contracts-upgradeable (npm) Fixed in 4.3.3 Advisory →

Timeline

  1. 2026-10-03 Threatist record created from GHSA-wmpv-c2jp-j2xg

References

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences