Skip to content

SAFE — the smart contract vulnerability database

203 documented ways a Solidity contract loses money, each with what goes wrong, the code that does it, the code that does not, and the incidents where it actually happened. This is the table the SaferICO scanner grades contracts against — 201 of the 203 have an automated detector behind them.

The SWC registry, the field's usual reference, stopped being updated years ago and stops at SWC-136. 70 of the entries below have no SWC id at all — vault inflation, sequencer-uptime feeds, ERC-4626 rounding, EIP-7702 delegation. Those are the ones costing money now.

203
Documented vulnerability classes
26
Rated critical
20
Categories
105
With a proof-of-concept exploit
Severity
Category

203 of 203 shown

SAFE-0001 Classic Single-Function ReentrancyReentrancy · SWC-107 · CWE-841 critical SAFE-0002 Cross-Function ReentrancyReentrancy · SWC-107 · CWE-841 critical SAFE-0003 Read-Only ReentrancyReentrancy · SWC-107 · CWE-841 high SAFE-0004 ERC-777 / Token Hook ReentrancyReentrancy · SWC-107 · CWE-841 critical SAFE-0005 Reentrancy via Forced Callback AbuseReentrancy · SWC-107 · CWE-841 high SAFE-0006 Missing Access Control on Privileged FunctionAccess Control · SWC-105 · CWE-284 critical SAFE-0007 tx.origin Used for AuthenticationAccess Control · SWC-115 · CWE-477 high SAFE-0008 Unprotected Initializer / InitializationAccess Control · SWC-118 · CWE-665 critical SAFE-0009 Missing Initializer Disable on ImplementationAccess Control · SWC-118 · CWE-665 high SAFE-0010 Privilege Escalation via Role MisconfigurationAccess Control · SWC-105 · CWE-269 critical SAFE-0011 Two-Step Ownership Transfer MissingAccess Control · SWC-105 · CWE-284 medium SAFE-0012 Role Revocation FailureAccess Control · SWC-105 · CWE-284 medium SAFE-0013 Authorization Through msg.data / Signature ConfusionAccess Control · SWC-105 · CWE-345 high SAFE-0014 Hardcoded Privileged AddressAccess Control · no SWC entry · CWE-547 medium SAFE-0015 Backdoor / Hidden Privileged FunctionAccess Control · no SWC entry · CWE-912 critical SAFE-0016 Integer Overflow / Underflow (pre-0.8 or unchecked)Arithmetic · SWC-101 · CWE-190 critical SAFE-0017 Division Before Multiplication Precision LossArithmetic · SWC-101 · CWE-682 medium SAFE-0018 Rounding Error ExploitationArithmetic · SWC-101 · CWE-682 high SAFE-0019 Vault Inflation / First-Depositor Share AttackDeFi Economic · no SWC entry · CWE-682 critical SAFE-0020 Share Price / Staking Share ManipulationDeFi Economic · no SWC entry · CWE-682 high SAFE-0021 Liquidity Share Manipulation / Donation AttackDeFi Economic · no SWC entry · CWE-682 high SAFE-0022 Spot-Price Oracle ManipulationOracle / Price · no SWC entry · CWE-345 critical SAFE-0023 Flash-Loan Price ManipulationOracle / Price · no SWC entry · CWE-345 critical SAFE-0024 Stale / Unchecked Oracle DataOracle / Price · no SWC entry · CWE-345 high SAFE-0025 Insufficient TWAP Window / Manipulable TWAPOracle / Price · no SWC entry · CWE-345 medium SAFE-0026 Unchecked Low-Level Call Return ValueExternal Calls · SWC-104 · CWE-252 high SAFE-0027 Unchecked ERC-20 transfer/transferFrom ReturnExternal Calls · SWC-104 · CWE-252 high SAFE-0028 Delegatecall to Untrusted / Arbitrary TargetExternal Calls · SWC-112 · CWE-829 critical SAFE-0029 Arbitrary External Call InjectionExternal Calls · no SWC entry · CWE-829 critical SAFE-0030 Unsafe Type Casting / Downcast TruncationArithmetic · SWC-101 · CWE-704 medium SAFE-0031 Dirty Higher-Order Bits / Unsafe Assembly MathLow-Level / Assembly · SWC-127 · CWE-704 medium SAFE-0032 Memory Corruption in AssemblyLow-Level / Assembly · SWC-127 · CWE-787 high SAFE-0033 Storage Collision in Proxy / DelegatecallUpgradeability · SWC-124 · CWE-668 critical SAFE-0034 Upgradeable Storage Layout CorruptionUpgradeability · SWC-124 · CWE-668 critical SAFE-0035 UUPS Upgrade Authorization BugUpgradeability · no SWC entry · CWE-284 critical SAFE-0036 Proxy Admin TakeoverUpgradeability · no SWC entry · CWE-284 critical SAFE-0037 DoS via Unexpected Revert in Loop / Push PaymentsDenial of Service · SWC-113 · CWE-703 high SAFE-0038 DoS via Unbounded Loop / Gas ExhaustionDenial of Service · SWC-128 · CWE-400 high SAFE-0039 Gas Griefing via Subcall Gas ForwardingDenial of Service · SWC-126 · CWE-400 medium SAFE-0040 Locked Ether / No Withdrawal PathDenial of Service · SWC-132 · CWE-664 high SAFE-0041 Forced Ether Reception Breaking Balance InvariantsDenial of Service · SWC-132 · CWE-697 medium SAFE-0042 Predictable / Weak On-Chain RandomnessRandomness · SWC-120 · CWE-330 high SAFE-0043 Blockhash / Block Number DependenceRandomness · SWC-120 · CWE-330 medium SAFE-0044 Signature Replay AttackSignatures · SWC-121 · CWE-294 critical SAFE-0045 Cross-Chain / Cross-Contract Signature ReplaySignatures · SWC-121 · CWE-294 high SAFE-0046 Missing ecrecover Zero-Address / Malleability CheckSignatures · SWC-117 · CWE-347 high SAFE-0047 Weak / Incorrect Signature ValidationSignatures · SWC-117 · CWE-347 high SAFE-0048 Hash Collision via abi.encodePacked with Dynamic TypesSignatures · SWC-133 · CWE-347 medium SAFE-0049 Merkle Proof Validation ErrorSignatures · no SWC entry · CWE-345 high SAFE-0050 ERC-20 Approval Race ConditionToken Standards · SWC-114 · CWE-362 medium SAFE-0051 Missing SafeERC20 / Non-Standard Token HandlingToken Standards · SWC-104 · CWE-252 high SAFE-0052 Fee-on-Transfer / Rebasing Token Accounting MismatchToken Standards · no SWC entry · CWE-682 high SAFE-0053 Unsafe / Unprotected MintingToken Standards · no SWC entry · CWE-284 critical SAFE-0054 ERC-721/1155 Missing Receiver Validation (Safe Transfer)Token Standards · no SWC entry · CWE-393 medium SAFE-0055 Burn Authorization / Burn-From Missing ChecksToken Standards · SWC-105 · CWE-284 high SAFE-0056 EIP-2612 Permit Misuse / Front-RunningToken Standards · no SWC entry · CWE-294 medium SAFE-0057 Front-Running / Transaction Ordering DependenceMEV / Ordering · SWC-114 · CWE-362 high SAFE-0058 Sandwich Attack via Missing Slippage ProtectionMEV / Ordering · no SWC entry · CWE-682 high SAFE-0059 Missing Deadline on Swaps / Stale ExecutionMEV / Ordering · no SWC entry · CWE-841 medium SAFE-0060 Governance Takeover via Flash-Loaned Voting PowerGovernance · no SWC entry · CWE-284 critical SAFE-0061 Missing Timelock on Governance ExecutionGovernance · no SWC entry · CWE-284 high SAFE-0062 Vote Double-Counting / Delegation Snapshot BugGovernance · no SWC entry · CWE-682 high SAFE-0063 Bridge Message Forgery / Insufficient Proof VerificationBridge / Cross-Chain · no SWC entry · CWE-345 critical SAFE-0064 Cross-Domain Authentication FailureBridge / Cross-Chain · no SWC entry · CWE-284 critical SAFE-0065 Block Timestamp Manipulation DependenceTime Dependence · SWC-116 · CWE-829 medium SAFE-0066 Timelock / Deadline Missing on Sensitive ActionTime Dependence · no SWC entry · CWE-841 medium SAFE-0067 Reward Inflation / Incorrect Reward AccountingDeFi Economic · no SWC entry · CWE-682 high SAFE-0068 Duplicate Claim / Claim Without State UpdateDeFi Economic · no SWC entry · CWE-841 high SAFE-0069 Double-Spend Logic / Nonce ReuseDeFi Economic · no SWC entry · CWE-294 high SAFE-0070 State Desync Between Related VariablesLogic / State · no SWC entry · CWE-664 medium SAFE-0071 Incorrect Accounting / Internal Balance DriftLogic / State · no SWC entry · CWE-682 high SAFE-0072 Missing Zero-Address ValidationInput Validation · no SWC entry · CWE-20 low SAFE-0073 Missing Input Validation / Parameter BoundsInput Validation · no SWC entry · CWE-20 medium SAFE-0074 Array Length Mismatch in Batch OperationsInput Validation · no SWC entry · CWE-20 medium SAFE-0075 Missing Event Emission on Critical ActionBest Practice · no SWC entry · CWE-778 low SAFE-0076 Use of Deprecated / Dangerous Constructs (selfdestruct, suicide, throw)Best Practice · SWC-106 · CWE-477 medium SAFE-0077 Dead Code / Unreachable or Unused Critical VariableBest Practice · SWC-131 · CWE-561 low SAFE-0078 Floating / Unlocked PragmaBest Practice · SWC-103 · CWE-664 low SAFE-0079 Outdated Compiler / Known Compiler Bug ExposureBest Practice · SWC-102 · CWE-1104 medium SAFE-0080 Out-of-Gas in Loop Causing Stuck FundsDenial of Service · SWC-128 · CWE-400 high SAFE-0081 Storage vs Memory Misuse Causing State BugLogic / State · no SWC entry · CWE-665 medium SAFE-0082 Centralization Risk / Excessive Admin PowerCentralization · no SWC entry · CWE-269 medium SAFE-0083 Emergency Pause Missing / Pause BypassBest Practice · no SWC entry · CWE-693 medium SAFE-0084 Incorrect Decimal / Token Unit HandlingArithmetic · no SWC entry · CWE-682 high SAFE-0085 Missing Slippage Protection on Liquidity/Swap OpsMEV / Ordering · no SWC entry · CWE-682 high SAFE-0086 Swap Path / Route Validation MissingMEV / Ordering · no SWC entry · CWE-20 medium SAFE-0087 Dust Accumulation / Rounding Residue LockupArithmetic · no SWC entry · CWE-682 low SAFE-0088 ABI Encoding Collision / Selector ClashLow-Level / Assembly · no SWC entry · CWE-436 medium SAFE-0089 Short Address / Calldata Padding (legacy)Input Validation · no SWC entry · CWE-20 low SAFE-0090 Approval / Allowance Not Reset After UseToken Standards · no SWC entry · CWE-459 low SAFE-0091 NFT Receiver / onERC721Received Missing ValidationToken Standards · no SWC entry · CWE-393 medium SAFE-0092 Return Data Length Not Checked (Memory Bomb / Decode Error)External Calls · no SWC entry · CWE-130 medium SAFE-0093 Selfdestruct Dependency / Forced Removal AssumptionLogic / State · SWC-106 · CWE-477 medium SAFE-0094 Predictable Contract Address / CREATE2 Reorg RiskLogic / State · no SWC entry · CWE-330 medium SAFE-0095 Uninitialized Storage Pointer (legacy)Logic / State · SWC-109 · CWE-824 high SAFE-0096 Default Visibility / Function Exposed (legacy)Access Control · SWC-100 · CWE-710 medium SAFE-0097 Assert/Require Misuse and Improper Error HandlingBest Practice · SWC-110 · CWE-617 low SAFE-0098 Insufficient Withdrawal / Pull Pattern Not EnforcedDenial of Service · SWC-113 · CWE-703 medium SAFE-0101 Spot-Price Oracle from AMM ReservesOracle / Price · SWC-136 · CWE-1339 high SAFE-0102 Chainlink Feed Without Staleness / Round CheckOracle / Price · SWC-136 · CWE-829 high SAFE-0103 Price Feed Missing Sanity BoundsOracle / Price · SWC-136 · CWE-20 medium SAFE-0104 Swap Without Slippage Protection (minAmountOut = 0)MEV / Ordering · SWC-114 · CWE-682 high SAFE-0105 Swap Deadline Set to block.timestampMEV / Ordering · SWC-114 · CWE-829 medium SAFE-0107 Fee-on-Transfer / Rebasing Token Mis-AccountingToken Standards · SWC-134 · CWE-682 high SAFE-0109 ERC20 approve() Race ConditionToken Standards · SWC-114 · CWE-362 medium SAFE-0111 First-Depositor / Vault Inflation (Donation) AttackDeFi Economic · no SWC entry · CWE-682 high SAFE-0112 ecrecover Without Zero-Address GuardSignatures · SWC-117 · CWE-347 high SAFE-0113 Missing Nonce — Signature ReplaySignatures · SWC-121 · CWE-294 high SAFE-0114 Signature Missing Domain / chainid — Cross-Chain ReplaySignatures · SWC-121 · CWE-294 medium SAFE-0115 Signature Malleability (No high-s / v Check)Signatures · SWC-117 · CWE-347 medium SAFE-0116 Unprotected selfdestructAccess Control · SWC-106 · CWE-284 critical SAFE-0117 delegatecall to User-Controlled TargetLow-Level / Assembly · SWC-112 · CWE-829 critical SAFE-0119 DEFAULT_ADMIN_ROLE Retained by DeployerAccess Control · SWC-115 · CWE-269 medium SAFE-0121 unchecked{} Block Hiding Over/UnderflowArithmetic · SWC-101 · CWE-190 medium SAFE-0122 Unsafe Downcast (uint256 → smaller)Arithmetic · SWC-101 · CWE-197 medium SAFE-0124 Push-Payment DoS (Loop of External Transfers)Denial of Service · SWC-113 · CWE-703 high SAFE-0125 Return-Data Bomb / Gas Griefing on External CallExternal Calls · SWC-113 · CWE-400 medium SAFE-0126 Weak On-Chain RandomnessRandomness · SWC-120 · CWE-330 high SAFE-0128 Upgradeable Base Missing Storage GapUpgradeability · SWC-124 · CWE-665 medium SAFE-0129 State Initialised in Constructor of Upgradeable ContractUpgradeability · SWC-118 · CWE-665 high SAFE-0131 Unchecked Low-Level Call Return ValueExternal Calls · SWC-104 · CWE-252 high SAFE-0133 Owner Can Mint Unlimited SupplyCentralization · SWC-115 · CWE-269 medium SAFE-0134 Transfer Blacklist / Freeze BackdoorCentralization · SWC-115 · CWE-284 medium SAFE-0135 Fee Setter Without Upper BoundAccess Control · SWC-115 · CWE-269 medium SAFE-0136 Governance Voting Weight from Spot balanceOfGovernance · SWC-115 · CWE-284 high SAFE-0138 Floating / Unlocked PragmaBest Practice · SWC-103 · CWE-1104 low SAFE-0139 Deprecated / Unsafe Language ConstructsBest Practice · SWC-111 · CWE-477 low SAFE-0140 Missing Zero-Address Validation on Critical SetterInput Validation · SWC-123 · CWE-20 low SAFE-0141 No Event on Critical State ChangeBest Practice · no SWC entry · CWE-778 low SAFE-0142 Uninitialised Storage PointerLogic / State · SWC-109 · CWE-824 medium SAFE-0143 transfer()/send() 2300-Gas StipendExternal Calls · SWC-134 · CWE-703 medium SAFE-0146 msg.value Reused Across a Loop / MulticallLogic / State · no SWC entry · CWE-837 high SAFE-0147 Reentrancy via ERC721/1155 safe-Transfer CallbackReentrancy · SWC-107 · CWE-841 high SAFE-0201 TWAP Window Too Short to Resist ManipulationOracle / Price · SWC-136 · CWE-1339 high SAFE-0202 L2 Sequencer Uptime Feed Not CheckedOracle / Price · SWC-136 · CWE-829 medium SAFE-0203 Oracle Decimals Assumed / MismatchedOracle / Price · SWC-136 · CWE-682 medium SAFE-0204 Single Oracle Source, No FallbackOracle / Price · SWC-136 · CWE-1188 medium SAFE-0205 Negative Oracle Answer (int256) Not HandledOracle / Price · SWC-136 · CWE-190 medium SAFE-0206 permit() Consumed Without Deadline EnforcementSignatures · SWC-121 · CWE-294 medium SAFE-0207 permit() Front-Running Griefing (DoS on Deposit)Denial of Service · SWC-121 · CWE-703 low SAFE-0208 Non-Standard ERC20 Return Value Not HandledToken Standards · SWC-104 · CWE-252 high SAFE-0209 approve() Reverts on Non-Zero Allowance (USDT-style)Token Standards · SWC-104 · CWE-703 medium SAFE-0210 Tokens Transferable to the Contract Itself (Locked)Token Standards · no SWC entry · CWE-703 low SAFE-0211 State Updated Before Transfer Success ConfirmedLogic / State · SWC-104 · CWE-252 medium SAFE-0212 ERC1155 Batch Length MismatchToken Standards · no SWC entry · CWE-129 medium SAFE-0213 extcodesize == 0 Used as EOA Check (Bypassable)Access Control · no SWC entry · CWE-284 medium SAFE-0214 Unbounded Batch Mint / Airdrop LoopDenial of Service · SWC-128 · CWE-400 medium SAFE-0215 Unbounded / Unsanitised tokenURI MetadataBest Practice · no SWC entry · CWE-20 low SAFE-0216 Contract Cannot Receive ERC721/1155 (Locked NFTs)Token Standards · no SWC entry · CWE-703 low SAFE-0217 Rounding Direction Favors the UserDeFi Economic · no SWC entry · CWE-682 medium SAFE-0218 First Liquidity Not Locked (MINIMUM_LIQUIDITY)DeFi Economic · no SWC entry · CWE-682 high SAFE-0219 Reward-Per-Token Precision LossArithmetic · SWC-101 · CWE-682 medium SAFE-0220 Interest / Rewards Not Accrued Before State ChangeDeFi Economic · no SWC entry · CWE-682 high SAFE-0221 Bad Debt Not Socialised / HandledDeFi Economic · no SWC entry · CWE-682 medium SAFE-0222 Liquidation Missing Bounds / Self-LiquidationDeFi Economic · no SWC entry · CWE-284 medium SAFE-0223 Same-Block Deposit/Withdraw Share ManipulationDeFi Economic · no SWC entry · CWE-682 high SAFE-0224 renounceOwnership Can Brick Privileged FunctionsAccess Control · SWC-115 · CWE-284 medium SAFE-0225 Rescue/Sweep Function Can Take User FundsAccess Control · SWC-115 · CWE-284 high SAFE-0226 Single-Step Critical Role TransferAccess Control · SWC-115 · CWE-284 low SAFE-0227 pause()/unpause() Without Access ControlAccess Control · SWC-106 · CWE-284 medium SAFE-0228 Timelock Bypass — Admin Can Also Act DirectlyGovernance · SWC-115 · CWE-284 medium SAFE-0229 Signature-Based Authorization Without ExpirySignatures · SWC-121 · CWE-294 medium SAFE-0230 Proxy / Implementation Storage Layout CollisionUpgradeability · SWC-124 · CWE-665 high SAFE-0231 Function Selector Clash (Proxy vs Implementation)Upgradeability · SWC-124 · CWE-436 medium SAFE-0232 Upgrade Without Timelock or GovernanceUpgradeability · SWC-115 · CWE-284 medium SAFE-0233 UUPS _authorizeUpgrade UnprotectedUpgradeability · SWC-112 · CWE-284 critical SAFE-0234 immutable Variable Reads Zero Through ProxyUpgradeability · SWC-118 · CWE-665 high SAFE-0235 Inline Assembly Not Marked memory-safeLow-Level / Assembly · SWC-127 · CWE-758 low SAFE-0236 CREATE2 Address Reuse After selfdestruct (Metamorphic)Low-Level / Assembly · SWC-112 · CWE-1188 high SAFE-0237 Raw returndata Copied / Decoded UnsafelyExternal Calls · SWC-104 · CWE-252 medium SAFE-0238 Hardcoded Gas Forwarded in External CallExternal Calls · SWC-134 · CWE-703 low SAFE-0239 extcodehash / Code Check Bypass AssumptionsAccess Control · no SWC entry · CWE-284 low SAFE-0240 Unbounded Array Growth (No Cap on push)Denial of Service · SWC-128 · CWE-400 medium SAFE-0241 Iterating / Deleting Large Storage Mapping-ArrayDenial of Service · SWC-128 · CWE-400 medium SAFE-0242 Loop Bound by User-Controlled LengthDenial of Service · SWC-128 · CWE-834 medium SAFE-0243 Revert Reason Griefing / Return Bomb in LoopDenial of Service · SWC-113 · CWE-400 low SAFE-0244 Batch Operation Depends on Block Gas LimitDenial of Service · SWC-128 · CWE-400 medium SAFE-0245 Bridge Message Replay (No Processed-Nonce Map)Bridge / Cross-Chain · SWC-121 · CWE-294 high SAFE-0246 Cross-Chain Source / Sender Not VerifiedBridge / Cross-Chain · SWC-115 · CWE-345 critical SAFE-0247 chainId Not Bound in Cross-Chain PayloadBridge / Cross-Chain · SWC-121 · CWE-294 medium SAFE-0248 Cross-Chain Message Ordering Not EnforcedBridge / Cross-Chain · no SWC entry · CWE-362 medium SAFE-0249 Missing Claimed Flag — Double ClaimLogic / State · no SWC entry · CWE-837 high SAFE-0250 State Not Reset After Use (Action Replay)Logic / State · no SWC entry · CWE-841 medium SAFE-0251 Strict address(this).balance Equality (Force-Feed)Logic / State · SWC-132 · CWE-697 medium SAFE-0252 Front-Runnable Reveal (No Commit-Reveal)MEV / Ordering · SWC-114 · CWE-362 medium SAFE-0253 Off-By-One in Cap / Bound CheckLogic / State · no SWC entry · CWE-193 low SAFE-0254 Critical Entrypoints Not PausableBest Practice · no SWC entry · CWE-703 low SAFE-0255 Array Index Used Without Bounds AssumptionInput Validation · no SWC entry · CWE-129 low SAFE-0256 Missing SPDX License IdentifierBest Practice · SWC-102 · CWE-1104 low SAFE-0257 Shadowed State / Local VariableBest Practice · SWC-119 · CWE-710 low SAFE-0258 Return Value of Call IgnoredBest Practice · SWC-104 · CWE-252 low SAFE-0259 Hardcoded Address / Magic ConstantBest Practice · no SWC entry · CWE-547 low SAFE-0260 Storage Variable Read Repeatedly in a LoopBest Practice · no SWC entry · CWE-1176 low SAFE-0301 Locked Ether — Receives ETH With No Withdraw PathLogic / State · SWC-132 · CWE-664 medium SAFE-0302 delegatecall Inside a LoopLow-Level / Assembly · SWC-112 · CWE-829 high SAFE-0303 Inline Assembly return/revert Bypasses SolidityLow-Level / Assembly · SWC-127 · CWE-1038 low SAFE-0304 Missing Zero-Value Validation on Value-Moving FunctionInput Validation · SWC-123 · CWE-20 low SAFE-0305 Reentrancy Guard Not Applied to Every External State-ChangerReentrancy · SWC-107 · CWE-841 medium SAFE-0306 require/revert Without a Reason StringBest Practice · SWC-123 · CWE-1078 low SAFE-0307 Custom Boolean Reentrancy Lock (Fragile)Reentrancy · SWC-107 · CWE-841 medium SAFE-0308 abi.decode of Untrusted bytes ParameterExternal Calls · SWC-104 · CWE-20 medium SAFE-0309 block.timestamp Used in a Strict EqualityTime Dependence · SWC-116 · CWE-829 low SAFE-0310 Return Value of send() IgnoredExternal Calls · SWC-104 · CWE-252 high
Check your own contract for this

Paste an address or your Solidity source and the same 201 detectors run against it in your browser. Nothing is uploaded.

Run the scanner See how it is attacked Read the docs