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
hi, the mintToken function of SwftCoin seems to has an integer overflow that allows the owner of the contract to set the balance of an arbitrary user to any value.
function mintToken(address target, uint256 mintedAmount) onlyOwner { balanceOf[target] += mintedAmount; totalSupply += mintedAmount; Transfer(0, this, mintedAmount); Transfer(this, target, mintedAmount); }
you can see the test of this vulnerability in https://github.com/n0pn0pn0p/smart_contract_-vulnerability/edit/master/PolyAi.md , plz verify, thx!
(yogurt.yang@dbappsecurity.com.cn)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
hi, the mintToken function of SwftCoin seems to has an integer overflow that allows the owner of the contract to set the balance of an arbitrary user to any value.
function mintToken(address target, uint256 mintedAmount) onlyOwner {
balanceOf[target] += mintedAmount;
totalSupply += mintedAmount;
Transfer(0, this, mintedAmount);
Transfer(this, target, mintedAmount);
}
you can see the test of this vulnerability in https://github.com/n0pn0pn0p/smart_contract_-vulnerability/edit/master/PolyAi.md , plz verify, thx!
(yogurt.yang@dbappsecurity.com.cn)
The text was updated successfully, but these errors were encountered: