{"answers":{"affected":"4 open source packages ship an affected version, including @openzeppelin/contracts and @openzeppelin/contracts-upgradeable.","exploited":"There is no known exploitation of GHSA-wmpv-c2jp-j2xg in the wild and no public exploit code.","fix":"Upgrade @openzeppelin/contracts to 4.3.3 or later.","what":"GHSA-wmpv-c2jp-j2xg is a vulnerability in @openzeppelin/contracts, published on 15 Nov 2021."},"fix_prompt":"Check this codebase for GHSA-wmpv-c2jp-j2xg and fix it if it is affected.\n\nWhat it is: GHSA-wmpv-c2jp-j2xg is a vulnerability in @openzeppelin/contracts, published on 15 Nov 2021. \nExploitation: There is no known exploitation of GHSA-wmpv-c2jp-j2xg in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @openzeppelin/contracts (npm): affected from 4.2.0; fixed in 4.3.3\n- @openzeppelin/contracts (npm): affected from 4.2.0; fixed in 4.3.3\n- @openzeppelin/contracts-upgradeable (npm): affected from 4.2.0; fixed in 4.3.3\n- @openzeppelin/contracts-upgradeable (npm): affected from 4.2.0; fixed in 4.3.3\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-wmpv-c2jp-j2xg/ (Markdown: https://insights.sbomify.com/GHSA-wmpv-c2jp-j2xg/index.md)","id":"GHSA-wmpv-c2jp-j2xg","markdown":"https://insights.sbomify.com/GHSA-wmpv-c2jp-j2xg/index.md","name":"GHSA-wmpv-c2jp-j2xg","record":{"aliases":[],"analysis":null,"analysis_generated_by":null,"assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"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.\n\n### Impact\nIf 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.\n\n### Patches\nA fix is included in version 4.3.3 of `@openzeppelin/contracts` and `@openzeppelin/contracts-upgradeable`.\n\n### Workarounds\nIf accurate supply is relevant, do not mint tokens to untrusted receivers.\n\n### Credits\nThe issue was identified and reported by @ChainSecurityAudits.\n\n### For more information\nRead [TotalSupply Inconsistency in ERC1155 NFT Tokens](https://medium.com/chainsecurity/totalsupply-inconsistency-in-erc1155-nft-tokens-8f8e3b29f5aa) by @ChainSecurityAudits for a more detailed breakdown.\n\nIf you have any questions or comments about this advisory, email us at security@openzeppelin.com.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"ERC1155Supply vulnerability in OpenZeppelin Contracts","id":"GHSA-wmpv-c2jp-j2xg","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":null,"year":"2021"},"n_packages":4,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["4.3.3"],"introduced":["4.2.0"],"last_affected":[],"package":"@openzeppelin/contracts","purl":null,"source":"GHSA-wmpv-c2jp-j2xg"},{"ecosystem":"npm","fixed":["4.3.3"],"introduced":["4.2.0"],"last_affected":[],"package":"@openzeppelin/contracts","purl":"pkg:npm/%40openzeppelin/contracts","source":"GHSA-wmpv-c2jp-j2xg"},{"ecosystem":"npm","fixed":["4.3.3"],"introduced":["4.2.0"],"last_affected":[],"package":"@openzeppelin/contracts-upgradeable","purl":null,"source":"GHSA-wmpv-c2jp-j2xg"},{"ecosystem":"npm","fixed":["4.3.3"],"introduced":["4.2.0"],"last_affected":[],"package":"@openzeppelin/contracts-upgradeable","purl":"pkg:npm/%40openzeppelin/contracts-upgradeable","source":"GHSA-wmpv-c2jp-j2xg"}],"products":null,"published":"2021-11-15","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":null,"url":"https://insights.sbomify.com/GHSA-wmpv-c2jp-j2xg/"}