CVE-2018-13668
Description
The mintToken function of a smart contract implementation for BTPCoin, an Ethereum token, has an integer overflow that allows the owner of the contract to set the balance of an arbitrary user to any value.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Owner of BTPCoin token can arbitrarily set any user's balance via integer overflow in the mintToken function.
Vulnerability
The mintToken function in the BTPCoin Ethereum smart contract (an ERC-20 token implementation) contains an integer overflow vulnerability [1]. The function allows the contract owner to mint new tokens to an arbitrary address. The overflow occurs because the arithmetic operation balanceOf[target] += mintedAmount is performed without a safe math check, enabling the owner to overflow the target's balance to any desired value, including extremely large or arbitrary amounts [2]. Affected version: all deployments of the BTPCoin contract as available on GitHub [2].
Exploitation
An attacker who is the contract owner can call the mintToken function with a large mintedAmount value. Because Solidity's default integer arithmetic wraps around on overflow (prior to the widespread use of SafeMath), adding a sufficiently large mintedAmount to the target's existing balance can cause the uint256 sum to overflow, resulting in a controlled and unexpected final balance [1][2]. No other authentication or privilege is required beyond owner access; no user interaction is required.
Impact
A successful exploitation allows the contract owner to arbitrarily set the balance of any user address to any value. This can effectively mint an unlimited number of tokens, leading to a total loss of token supply integrity, potential theft of funds via subsequent transfers, and complete devaluation of the token [2].
Mitigation
No fix is publicly available for the specific BTPCoin contract as indicated in the references; the vulnerable code remains unpatched [2]. The recommended mitigation for developers is to use a safe math library (e.g., OpenZeppelin's SafeMath) to prevent integer overflows [1]. Token holders should treat this contract as untrusted and avoid acquiring or using BTPCoin tokens.
AI Insight generated on May 26, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
1Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
2- github.com/BlockChainsSecurity/EtherTokens/blob/master/GEMCHAIN/mint%20integer%20overflow.mdmitrex_refsource_MISC
- github.com/BlockChainsSecurity/EtherTokens/tree/master/BTPCoinmitrex_refsource_MISC
News mentions
0No linked articles in our index yet.