CVE-2018-13213
Description
The sell function of a smart contract implementation for TravelCoin (TRV), an Ethereum token, has an integer overflow in which "amount * sellPrice" can be zero, consequently reducing a seller's assets.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Integer overflow in TravelCoin (TRV) token's sell function allows setting sellPrice such that amount*sellPrice overflows to zero, causing sellers to lose tokens without receiving ETH.
Vulnerability
The TravelCoin (TRV) Ethereum token smart contract contains an integer overflow vulnerability in its sell function. Specifically, the calculation amount * sellPrice can overflow to zero when sellPrice is set to a sufficiently large value, such as 0x8000000000000000000000000000000000000000000000000000000000000000 [1]. This allows a seller to send amount tokens but receive zero ETH in return. The affected code is present in the TravelCoinToken contract [2].
Exploitation
An attacker (typically the contract owner) can set sellPrice to an extremely high value using the setPrices() function [1]. When a victim attempts to sell multiple tokens (e.g., 2 tokens), the multiplication amount * sellPrice overflows, resulting in zero. The contract then transfers the tokens from the seller to the contract balance and attempts to send zero ETH to the seller, effectively stealing the tokens [1]. No additional privileges or user interaction beyond holding tokens are required.
Impact
A seller loses their tokens without receiving any ETH in return. The contract retains the tokens, which can be later manipulated or sold by the owner. This leads to direct financial loss for sellers and undermines trust in the token [1].
Mitigation
The vulnerability exists in the TravelCoin contract code, and no official fix has been published as of the CVE release date [2]. Users should avoid using the affected smart contract. As a workaround, contract developers should implement safe arithmetic operations (e.g., using SafeMath library) to prevent overflows. Consider migrating to a token with audited contract code.
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/ETHEREUMBLACK/sell%20integer%20overflow.mdmitrex_refsource_MISC
- github.com/BlockChainsSecurity/EtherTokens/tree/master/TravelCoinTokenmitrex_refsource_MISC
News mentions
0No linked articles in our index yet.