#09 SC09:2026 High Held #8

Integer Overflow and Underflow

Integer overflow and underflow describe situations where arithmetic operations produce values outside the representable range of the operand type.

Official OWASP description, from scs.owasp.org (CC BY-NC-SA 4.0).

$260M
2025 losses attributed
28.8%
Of all 2025 SC losses

Why this rank in 2026

Held mid-list despite producing the largest single-category dollar total in 2025 ($260.4M, ~29% of all 2025 losses) - driven almost entirely by the Cetus Move bug on Sui. OWASP keeps it ranked #9 because Solidity 0.8+ has effectively closed the EVM half of the category; the remaining risk is non-EVM (Move, Rust, Cairo).

Why a 2016-era vulnerability is still on the 2026 Top 10

Solidity 0.8.0 (December 2020) added automatic overflow checks at the EVM level. By 2026, the EVM half of this category should be near-extinct. And yet SC09 is still the single largest dollar category in the 2025 dataset: ~$260M, ~29% of all losses for the year.

The reason is one incident: Cetus on Sui (May 2025, $223M). A flawed checked_shlw function in the Move integer-mate library used the condition n > (0xFFFFFFFFFFFFFFFF << 192) instead of n >= 1 << 192 - a one-bit error that allowed a 99.9% liquidity undercharge. Move's silent overflow semantics on left-shift meant the bug existed at all; the wrong comparison let it through review.

The non-EVM lesson

Every non-EVM platform has its own overflow semantics. Move silently wraps on left-shift. Rust panics in debug mode and wraps in release mode by default. Cairo has its own felt arithmetic with different boundaries. Auditors trained on Solidity 0.8+ habits often miss this when reviewing non-EVM code - and the dollar consequences in 2025 prove it.

How AI auditors handle this category

AI is strong on EVM overflow detection because the compiler and Slither already handle most of it. The gap is non-EVM, where the bug semantics differ between platforms and the patterns are less represented in training data. This is one of the cases where multi-VM experience matters - and exactly why auditors with Rust/Move/Cairo skills earn 30-50% above Solidity-only rates in 2026.

2025 incidents tied to this category

Pulled live from the SCH hack database, ordered by amount lost. Click any incident for the full post-mortem.

View the full SCH hack dashboard →

Vulnerable vs secure code

✗ Vulnerable solidity
// Vulnerable: pre-0.8 wrap-around - withdrawing more than balance underflows to max-uint
contract OldVault {
    mapping(address => uint256) public balance;

    function withdraw(uint256 amount) external {
        balance[msg.sender] = balance[msg.sender] - amount;   // pre-0.8: underflows silently
        payable(msg.sender).transfer(amount);
    }
}
✓ Secure solidity
// Secure: Solidity 0.8+ with explicit downcast check
contract Vault {
    mapping(address => uint128) public balance;

    function deposit(uint256 amount) external {
        require(amount <= type(uint128).max - balance[msg.sender], "overflow");
        balance[msg.sender] = uint128(uint256(balance[msg.sender]) + amount);
    }
}

AI vs human auditor on this category

Each bar is a detection rate: out of 100 known integer overflow bugs, how many that auditor type finds. Higher means more reliable. The gap below is the percentage-point difference - the work senior humans still do that AI does not.

AI auditor (frontier LLM)
89%
Human auditor (senior)
92%

% of SC09 bugs caught - higher is better.

Human advantage on SC09
+3 percentage points
Senior auditors catch 3 more integer overflow bugs per 100 than frontier AI today. That gap is the skill the SCH course teaches.

AI is strong on this category because compilers and lint tools have already automated most of the detection. The remaining gap is non-EVM platforms where the overflow semantics differ (Move silent wrap on left-shift, Rust default release-mode wrap, etc.) - exactly what hit Cetus on Sui in 2025.

Methodology: EVMbench, Cecuro purpose-built agent benchmarks, and senior-auditor self-reported catch rates. SCH editorial, not OWASP-authored.

Prevention checklist

  • Use Solidity 0.8.0+ for automatic overflow checks; document any unchecked block with a formal proof.
  • On non-EVM platforms (Move, Solana, Sui, Cairo): document overflow semantics, bounds-check before arithmetic, assert invariants, fuzz with extreme values.
  • Test extreme values on multiplication and exponentiation.
  • Validate downcasts (uint256 → uint128) explicitly.
  • Apply extra scrutiny to shared library functions; formal-verify critical math.

Detection tools

Industry-standard tools that detect this category. Tool mappings are SCH editorial - OWASP's per-category pages do not list specific tools.

Solidity 0.8+
compiler

built-in overflow checks at compile time

Slither
static

integer-overflow, divide-before-multiply

Mythril
symbolic

symbolic overflow detection

Aderyn
static

unchecked-arithmetic

Halmos / Certora
formal

formal proofs for critical math

Move Prover
formal

non-EVM bounds verification

FAQ

What is OWASP SC09 Integer Overflow and Underflow?
SC09 covers situations where arithmetic operations produce values outside the representable range of the operand type. It is #9 in the OWASP Smart Contract Top 10 2026. Solidity 0.8+ added automatic overflow checks at the EVM level, but non-EVM platforms (Move, Rust, Cairo) still ship the bug regularly with different overflow semantics.
Why is integer overflow still on OWASP Top 10 if Solidity 0.8+ fixed it?
The 2025 Cetus incident on Sui lost $223M to a Move integer overflow - the single largest 2025 smart-contract loss. Total SC09 losses reached $260.4M (around 29% of all 2025 smart-contract losses), driven almost entirely by Cetus. Solidity 0.8+ fixed the EVM half; non-EVM platforms (Move, Rust, Cairo) are the remaining risk.
What was the Cetus integer overflow bug?
In May 2025, Cetus on Sui lost $223M when the checked_shlw function in the Move integer-mate library used the condition n > (0xFFFFFFFFFFFFFFFF << 192) instead of n >= 1 << 192 - a one-bit comparison error that allowed a 99.9% liquidity undercharge. Move silent overflow semantics on left-shift meant the bug existed at all; the wrong comparison let it through review.
How is SC09 Integer Overflow different from SC07 Arithmetic Errors?
SC09 is about values exceeding the representable range of the type (overflow / underflow / wrap-around). SC07 is about math that compiles cleanly and stays in range but is still wrong - rounding direction, divide-before-multiply, precision loss. OWASP carved them apart in 2026 because the 2025 incident set produced large losses in both buckets with distinct root causes.
How do you prevent integer overflow in smart contracts?
On EVM: use Solidity 0.8.0+ for automatic overflow checks and document every unchecked block with a formal proof. On non-EVM platforms (Move, Solana, Sui, Cairo): document overflow semantics, bounds-check before arithmetic, assert invariants, fuzz with extreme values. Test multiplication and exponentiation against extreme inputs. Validate downcasts (uint256 to uint128) explicitly. Formal-verify critical math (Halmos, Certora, Move Prover).

Master the techniques that make this category exploitable

The SCH Smart Contract Hacking Course teaches the exploit primitives, audit techniques, and tool workflows for integer overflow and underflow and every other OWASP 2026 category.