Numeric Errors Affecting @openzeppelin/contracts package, versions >=4.2.0 <4.3.3


0.0
medium

Snyk CVSS

    Attack Complexity Low

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk ID SNYK-JS-OPENZEPPELINCONTRACTS-1921095
  • published 16 Nov 2021
  • disclosed 15 Nov 2021
  • credit Unknown

How to fix?

Upgrade @openzeppelin/contracts to version 4.3.3 or higher.

Overview

@openzeppelin/contracts is a library for contract development.

Affected versions of this package are vulnerable to Numeric Errors. 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, the 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.