109
Vulnerability Patterns
15
Categories
10
AI-Powered Checks
21
Supported Chains

All Vulnerability Patterns

Browse all 109 security patterns for smart contract analysis

keccak256 collisions

keccak256\(abi\.encodePacked\(
Pattern

tx.origin

tx\.origin
Pattern

Unsecure Proxy initialize

function initialize\(\)
Pattern

Missconfigured Admin Methods

function.*(Ownership|swap|set|admin|owner|destruct|change).*public
Pattern

Missconfigured Admin Methods (upgrades)

function.*(upgrade|update|delegate).*public
Pattern

Missconfigured Admin Methods (migrate)

function.*migrate\(
Pattern

Missconfigured methods

function.*(burn|mint|swap|withdraw|transfer|send).*public
Pattern

constructor missconfigurations

constructor\(\) public
Pattern

Missing access control

function.*(withdraw|transfer|mint|burn).*external[^{]*\{[^}]*(?!onlyOwner|require)
Pattern

Unprotected selfdestruct

selfdestruct\([^)]*\)
Pattern

Missing onlyOwner modifier

function.*(set|update|change|remove|add).*public(?!.*onlyOwner)
Pattern

delegatecall

\.delegatecall\(
Pattern

Unsecure raw call

\.call\.value\(.*\)\(\"\"\)
Pattern

State change after external call

\.call\{.*\}.*;\s*\w+\s*=
Pattern

Cross-function reentrancy

\.call\{.*\}\([^)]*\).*function
Pattern

Read-only reentrancy

balanceOf\(.*\).*\.call\{
Pattern

extcodesize

extcodesize\(
Pattern

selfdestruct

selfdestruct\(
Pattern

mstore | mload

(mstore|mload)
Pattern

sstore

sstore\(
Pattern

inline assembly

assembly\s*\{
Pattern

staticcall

\.staticcall\(
Pattern

returndatasize

returndatasize\(
Pattern

codecopy

codecopy\(
Pattern

create2

create2\(
Pattern

hardcoded addresses

0x[0-9a-zA-Z]{40};
Pattern

Old compiler versions

^pragma solidity(.*)0\.4
Pattern

untrusted parameters (calldata)

function.*calldata.*public
Pattern

untrusted parameters (memory)

function.*memory.*public
Pattern

recover

recover\(
Pattern

abi.decode

abi\.decode\(
Pattern

function set address

function.*set.*address.*
Pattern

unsafe transfer

erc20.*transfer\(
Pattern

Unchecked math

unchecked\s*\{
Pattern

Division before multiplication

\/.*\*
Pattern

Magic numbers

==\s*\d{5,}|>\s*\d{5,}|<\s*\d{5,}
Pattern

Hardcoded gas limits

\.call\{gas:\s*\d+\}
Pattern

Advanced chainlink

chainlink
Advanced

Stale price data

(latestRoundData|getRoundData)\(
Pattern

TWAP manipulation

observe\(|consult\(
Pattern

Price oracle

(getPrice|latestAnswer|getLatestPrice)\(
Pattern

Missing oracle heartbeat check

latestRoundData.*(?!updatedAt)
Pattern

Advanced Flash loans 1

flashLoan\(
Advanced

Advanced Flash loans 2

onFlashLoan\(
Advanced

Advanced Flash loans 3

ERC3156FlashBorrower.onFlashLoan
Advanced

Advanced Standard ERC4626 token vaults

ERC4626
Advanced

Advanced Hardened ERC4626 with OpenZeppelin

(previewWithdraw|previewDeposit)\(
Advanced

Advanced comptroller

comptroller
Advanced

Advanced interest rate models

interestrate
Advanced

Slippage control

(slippage|minAmount|amountOutMin)
Pattern

MEV sandwich attack vector

swap.*deadline|deadline.*swap
Pattern

Liquidity pool manipulation

(addLiquidity|removeLiquidity)\(
Pattern

Yield farming risk

(stake|unstake|harvest|compound)\(
Pattern

Vault share inflation

totalSupply\(\)\s*==\s*0
Pattern

ERC20 approve race

approve\([^,]+,\s*[^0]
Pattern

Missing zero address check

require\([^)]*!=\s*address\(0\)
Pattern

Unsafe ERC20 operations

\.transfer\(|\.transferFrom\(
Pattern

Missing return value check

IERC20\([^)]+\)\.(transfer|transferFrom|approve)\(
Pattern

Permit function

permit\(
Pattern

ERC721 safe transfer

safeTransferFrom\(
Pattern

ERC1155 batch operations

(safeBatchTransferFrom|balanceOfBatch)\(
Pattern

Advanced multisig

multisig
Advanced

Advanced signature

signature
Advanced

Timelock bypass

timelock|TimeLock
Pattern

Governance attack vector

(propose|vote|execute|queue)\(
Pattern

Quorum manipulation

quorum|votingPower
Pattern

Signature replay

(ecrecover|ECDSA\.recover)\(
Pattern

Missing nonce

signature.*(?!nonce)
Pattern

Weak randomness

(block\.timestamp|block\.number|blockhash).*random
Pattern

Proxy collision

ERC1967|TransparentUpgradeableProxy|UUPSUpgradeable
Pattern

Storage collision

StorageSlot|bytes32.*slot
Pattern

Uninitialized proxy

initializer|reinitializer
Pattern

Implementation self-destruct

selfdestruct.*implementation
Pattern

Missing gap variable

__gap
Pattern

Unbounded loop

for\s*\([^)]+\.length
Pattern

External call in loop

for.*\{[^}]*\.call
Pattern

Push to array

\.push\(
Pattern

Delete array element

delete.*\[
Pattern

Gas griefing

gasleft\(\)
Pattern

assert

assert\(
Pattern

require

require\(
Pattern

revert

revert\(
Pattern

Custom errors

error\s+\w+\(
Pattern

Try catch

try.*catch
Pattern

Block timestamp

block\.timestamp
Pattern

Block number dependence

block\.number
Pattern

Block hash

blockhash\(
Pattern

Deadline checks

deadline|expiry|expires
Pattern

Bridge vulnerability

(bridge|crossChain|layerZero|anyCall)\(
Pattern

Message verification

(verifyMessage|checkMessage)\(
Pattern

Chain ID check

block\.chainid|chainId
Pattern

random

random
Pattern

deposit

deposit
Pattern

delete

delete
Pattern

Advanced Uncallable pause function

_?pause\(\).*internal
Advanced

Blacklist function

(blacklist|blocklist|denylist)\(
Pattern

Fee on transfer

fee.*transfer|transfer.*fee
Pattern

Rebasing token

rebase\(
Pattern

Callback functions

(onERC721Received|onERC1155Received|tokensReceived)\(
Pattern

GPT Reentrancy Vulnerability

(\.call\()|(\.delegatecall\()|(\.send\()|(\.transfer\()
AI

GPT Unchecked External Calls

(\.call\()|(\.delegatecall\()|(\.send\()|(\.transfer\()|(\.rawCall\()|(\.callcode\()
AI

GPT Integer Overflow/Underflow

(overflow|underflow)
AI

GPT Unchecked Ownership

(owner|admin|controller|master)
AI

GPT Denial of Service (DoS) Vulnerabilities

(owner|admin|controller|master)
AI

GPT Unchecked Input Validation

(verify|validate|check|assert|calldata|memory)
AI

GPT Front-running Risk

(commit|reveal|auction|bid)\(
AI

GPT Centralization Risk

(onlyOwner|onlyAdmin|onlyRole|hasRole)\(
AI

GPT Logic Errors

(if|else|while|for).*\{
AI

GPT State Inconsistency

(balances|allowances|stakes)\[
AI