Numeric Errors Affecting @openzeppelin/contracts-upgradeable 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-OPENZEPPELINCONTRACTSUPGRADEABLE-1921094
  • published 16 Nov 2021
  • disclosed 15 Nov 2021
  • credit Unknown

Introduced: 15 Nov 2021

CVE NOT AVAILABLE CWE-189 Open this link in a new tab

How to fix?

Upgrade @openzeppelin/contracts-upgradeable to version 4.3.3 or higher.

Overview

@openzeppelin/contracts-upgradeable is a Secure Smart Contract library for Solidity.

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.