SwftcoinApplication · Swft

CVE-2018-12062

HIGH · 7.5 CVSS v3.0 Published 2018-06-25
Mitigation only
No fix yet — a mitigation exists. There is no fixed release. A documented workaround reduces exposure in the meantime.
See remediation →
84/100
Remediation priority · High
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
The sell function of a smart contract implementation for SwftCoin (SWFTC), a tradable Ethereum ERC20 token, allows a potential trap that could be used to cause financial damage to the seller, because of overflow of the multiplication of its argument amount and a manipulable variable sellPrice, aka the "tradeTrap" issue.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The SwftCoin (SWFTC) ERC20 token smart contract contains an integer overflow vulnerability in its sell function where the multiplication of the amount parameter and the sellPrice variable can overflow. Since sellPrice is manipulable by external actors, an attacker can exploit this to cause the multiplication to overflow, resulting in incorrect token-to-ETH calculations that can lead to financial loss for sellers.

MitigationImplement SafeMath library functions for arithmetic operations or upgrade to Solidity 0.8+ which includes built-in overflow checks; additionally, make sellPrice non-manipulable by fixing it as a constant, using an oracle, or adding access controls.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
SwftcoinApplication
Affected:all versions

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Locate the SwftCoin (SWFTC) smart contract source code
    Obtain the contract address from the token listing (e.g., Etherscan) and retrieve the verified source code from the blockchain explorer or your local deployment files. Confirm the contract is the SwftCoin ERC20 token.
    Affected if The contract source code matches the SwftCoin token and contains a sell function with arithmetic operations on the amount and sellPrice parameters.
  2. Inspect the sell function for arithmetic operations
    Locate the 'sell' function in the contract source code. Identify any multiplication operations involving the 'amount' parameter and a 'sellPrice' variable, for example: 'amount * sellPrice' or similar patterns.
    Affected if The sell function contains a direct multiplication of amount and sellPrice without using SafeMath library functions.
  3. Check if sellPrice is a public state variable
    Find the declaration of 'sellPrice' in the contract. Determine if it is declared as a public state variable (can be read by external accounts) and whether there exists a function that allows external actors to modify its value.
    Affected if sellPrice is a public variable that can be modified by any external address through a setter function or public access.
  4. Verify SafeMath library usage
    Search the source code for 'using SafeMath' statements and look for SafeMath function calls (such as .mul()) around arithmetic operations in the sell function.
    Affected if The contract does not import or use the SafeMath library for the multiplication operation, or uses direct arithmetic operators (*).
  5. Check Solidity compiler version
    Look for the 'pragma solidity' declaration at the top of the source code file to identify the compiler version used.
    Affected if The contract is compiled with a version below Solidity 0.8.0, which does not include built-in overflow checks.

A user is affected if they hold or interact with the SWFTC token contract where the sell function performs direct multiplication of amount and sellPrice without SafeMath or Solidity 0.8+, and sellPrice can be modified by external actors.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

From vendor data
Mitigation available No clean upgrade yet — mitigate in the meantime
Mitigation

Implement SafeMath library functions for arithmetic operations or upgrade to Solidity 0.8+ which includes built-in overflow checks; additionally, make sellPrice non-manipulable by fixing it as a constant, using an oracle, or adding access controls.

Fix this in Swftcoin Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing4.0 h
  • Review / QA4.0 h
20.0 hours of engineering $3,560
Get help mitigating

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $5,696.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2018-12062 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2018-12062 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data