Security mailing lists by PureSourceCode

GHSA-wmpv-c2jp-j2xg

LOW

ERC1155Supply vulnerability in OpenZeppelin Contracts

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 security@openzeppelin.com.

Published
15 Nov 2021
Last modified
15 Nov 2021
Sources
OSVJSON

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
OSV npm @openzeppelin/contracts >= 4.2.0, < 4.3.3 4.3.3
OSV npm @openzeppelin/contracts-upgradeable >= 4.2.0, < 4.3.3 4.3.3

References

History

  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 15 Nov 2021)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.