OpenZeppelin Contracts contains Incorrect Calculation
openzeppelin-contracts
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| @openzeppelin/contracts npm |
|
|
| @openzeppelin/contracts-upgradeable npm |
|
|
openzeppelin-contracts
| Product | Affected | Fixed in |
|---|---|---|
| @openzeppelin/contracts npm |
|
|
| @openzeppelin/contracts-upgradeable npm |
|
|
OpenZeppelin Contracts is a library for secure smart contract development. The ERC721Consecutive contract designed for minting NFTs in batches does not update balances when a batch has size 1 and consists of a single token. Subsequent transfers from the receiver of that token may overflow the balance as reported by `balanceOf`. The issue exclusively presents with batches of size 1. The issue has been patched in 4.8.2.
From the CVE record · GitHub_M
ERC721Consecutive does not update a recipient's balance when it mints a batch containing exactly one NFT. A subsequent transfer from that recipient may overflow the balance reported by `balanceOf`. The issue occurs only with batches of size 1; the input does not specify authentication or user-interaction requirements.
Teams using npm @openzeppelin/contracts or @openzeppelin/contracts-upgradeable versions 4.8.0 through versions before 4.8.2 should check their deployments.