-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attacker can use burnToMint()
to mint tokens without burning
#1783
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-411
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Comments
c4-submissions
added
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
labels
Nov 13, 2023
141345 marked the issue as duplicate of #51 |
141345 marked the issue as not a duplicate |
141345 marked the issue as duplicate of #1597 |
141345 marked the issue as duplicate of #1742 |
alex-ppg marked the issue as not a duplicate |
alex-ppg marked the issue as duplicate of #90 |
alex-ppg marked the issue as unsatisfactory: |
c4-judge
added
the
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
label
Dec 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate-411
unsatisfactory
does not satisfy C4 submission criteria; not eligible for awards
Lines of code
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/MinterContract.sol#L258
https://github.com/code-423n4/2023-10-nextgen/blob/8b518196629faa37eae39736837b24926fd3c07c/smart-contracts/NextGenCore.sol#L218
Vulnerability details
Impact
An attacker calls
MinterContract.burnToMint()
->safeMint()
callsIERC721Receiver(to).onERC721Received
-> theto
contract callsMinterContract.burnToMint()
._safeMint()
is called before_burn()
implying that the attacker can keep minting tokens without burning:TODO Proof of Concept
Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept.
Tools Used
Manual inspection.
Recommended Mitigation Steps
_burn()
before_mintProcessing()
.NextGenCore.burnToMint()
Assessed type
Reentrancy
The text was updated successfully, but these errors were encountered: