#03 SC03:2026 High ↓ from #2

Price Oracle Manipulation

Price oracle manipulation describes any situation where a smart contract relies on price or valuation data that can be directly or indirectly influenced by an attacker, causing the protocol to make decisions based on incorrect values.

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

Why this rank in 2026

Down from #2. Wider adoption of Chainlink price feeds and TWAP oracles reduced the frequency of pure spot-price manipulation in 2025, but the category remains a top-3 risk because it combines with flash loans (SC04) into the most damaging exploit chains.

What this category covers in 2026

Oracle manipulation is now a chain problem more than a primitive problem. In 2022, attackers built reentrancy + bad oracle exploits. In 2025, attackers built flash loan + oracle + arithmetic + governance exploits - multiple categories chained into a single transaction. OWASP's 2026 framing reflects this: oracle manipulation is no longer just "spot price from a single pair", it includes TWAP manipulation during low-liquidity windows, staleness when freshness is unchecked, and indirect manipulation where one protocol's pool becomes another protocol's price source.

Major 2025 incidents

  • NGP Token (Sep 2025) lost ~$2M to flash-loan-enabled DEX reserve manipulation. The protocol relied on raw pair balances for pricing.

  • GMX V1 (Jul 2025) lost $42M when a downward manipulation of the BTC global average short price (~57× distortion) was combined with a flash-loaned GLP purchase at depressed rates. OWASP cross-references this incident under SC03, SC06, and SC08 - it is a textbook chained exploit.

Why it dropped from #2 to #3

Chainlink price feeds and Uniswap V3 TWAP oracles are now near-universal. The frequency of pure spot-price manipulation dropped enough in 2025 to push the category down one rank, even though the chained variants remain devastating. The lesson is that oracle defense is necessary but not sufficient - protocols that survive 2026 will be the ones that also fix SC02 (business logic) and SC04 (flash-loan composition).

How AI auditors handle this category

AI tools handle obvious patterns - "you used pair.balances as a price source" - but consistently miss indirect manipulation paths. Examples include vaults whose share price becomes a downstream oracle for another protocol, or LP tokens used as collateral in protocols whose underlying values can be skewed. These require modeling cross-protocol relationships, which is currently a human domain. SCH's Oracle Manipulation attack page covers these patterns in depth.

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: single-source spot price from a low-liquidity pair
function getPrice() public view returns (uint256) {
    (uint112 r0, uint112 r1, ) = pair.getReserves();
    return uint256(r1) * 1e18 / uint256(r0);   // attacker can flash-loan to skew
}
✓ Secure solidity
// Secure: Chainlink price + TWAP cross-check + staleness guard
AggregatorV3Interface internal chainlink;
IUniswapV3Pool internal twapPool;

function getPrice() public view returns (uint256) {
    (, int256 cl, , uint256 updatedAt, ) = chainlink.latestRoundData();
    require(cl > 0, "chainlink invalid");
    require(block.timestamp - updatedAt <= MAX_STALENESS, "stale price");
    uint256 chainlinkPrice = uint256(cl);

    uint256 twapPrice = consultTwap(twapPool, 1800);    // 30-min TWAP
    uint256 delta = _absDelta(chainlinkPrice, twapPrice);
    require(delta * 100 / chainlinkPrice <= 5, "feed divergence");
    return chainlinkPrice;
}

AI vs human auditor on this category

Each bar is a detection rate: out of 100 known oracle manipulation 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)
48%
Human auditor (senior)
82%

% of SC03 bugs caught - higher is better.

Human advantage on SC03
+34 percentage points
Senior auditors catch 34 more oracle manipulation bugs per 100 than frontier AI today. That gap is the skill the SCH course teaches.

AI auditors recognize direct uses of pair balances or single-source oracles, but they frequently miss indirect manipulation paths through composability (one protocol's pool becoming another protocol's oracle). Humans still own the trust graph here.

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

Prevention checklist

  • Aggregate multiple independent price sources with outlier rejection.
  • Enforce maximum staleness thresholds on every feed read.
  • Use TWAP over a sufficient window (typically >= 30 min on Uniswap V3).
  • Avoid reliance on illiquid pools for critical pricing decisions.
  • Add circuit breakers; halt on suspicious feed deviations.
  • Monitor price deviations against reference markets (CEX prices, Chainlink).
  • Set conservative collateral factors / borrowing limits as a defense in depth.

Detection tools

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

Pessimistic Slither Detectors
static

pess-price-manipulation pack

Echidna
fuzz

oracle-driven solvency invariants

Manual review
human

design-level - automation has limited reach here

FAQ

What is OWASP SC03 Price Oracle Manipulation?
SC03 covers any situation where a smart contract relies on price or valuation data that can be directly or indirectly influenced by an attacker, causing the protocol to make decisions based on incorrect values. The category covers spot-price manipulation via DEX reserves, TWAP manipulation during low-liquidity windows, and indirect manipulation where one protocol pool becomes another protocol oracle.
Why did oracle manipulation drop from #2 to #3 in OWASP 2026?
Chainlink price feeds and Uniswap V3 TWAP oracles are now near-universal across DeFi. The frequency of pure spot-price manipulation dropped enough in 2025 to push the category down one rank. Chained exploits combining oracle + flash loan + arithmetic remain devastating - GMX V1 in July 2025 lost $42M to exactly this pattern.
How do you defend against price oracle manipulation in Solidity?
Aggregate multiple independent price sources with outlier rejection, enforce maximum staleness thresholds on every feed read, use TWAP over a sufficient window (typically 30+ minutes on Uniswap V3), avoid reliance on illiquid pools for critical pricing, add circuit breakers that halt on suspicious deviations, and set conservative collateral factors as defense in depth.
What is a TWAP oracle and how does it prevent manipulation?
A time-weighted average price (TWAP) oracle averages a price across a window (typically 30 minutes on Uniswap V3). It prevents single-block manipulation because an attacker would have to sustain a manipulated price across many blocks - which is expensive enough to make most attacks uneconomic. TWAPs still fail on low-liquidity pairs and during multi-block manipulation windows.
Can AI auditors detect oracle manipulation bugs?
AI auditors recognize direct uses of pair balances or single-source oracles (catch rate around 48%), but they frequently miss indirect manipulation paths through composability - one protocol pool becoming another protocol oracle, or LP tokens used as collateral in protocols whose underlying values can be skewed. Senior human auditors detect around 82% of cases because trust-graph reasoning is still a human domain.

Master the techniques that make this category exploitable

The SCH Smart Contract Hacking Course teaches the exploit primitives, audit techniques, and tool workflows for price oracle manipulation and every other OWASP 2026 category.