SubQuery Network's Settings contract was missing an onlyOwner check on the function that assigns protocol role addresses, so an attacker made itself StakingManager and RewardsDistributor and paid itself out of Staking's pooled SQT. This transaction is one of five SubQuery's own disclosure attributes to the bug; its total across all five is 382,433,441 SQT, about $134,000.
Security ·
Logged as “2026-04-12: Settings Access Control on SubQuerySettings”.
SubQuery Network runs a decentralized indexing protocol on Base, paid for and secured through its SQT token, with a central Settings contract that every other module looks up to find the current address of its dependencies: StakingManager, RewardsDistributor, and the rest of the protocol's roles. SubQuery's own incident report, published the day after the attack, names the bug plainly: setContractAddress() on the Settings implementation, selector 0xc413e5be, was missing its onlyOwner modifier, and had been since a change made after an April 2022 audit. Anyone could call it and reassign any of those role addresses to a contract they controlled.
DeFiHackLabs's proof of concept reaches the same unprotected logic through setBatchAddress(), the Settings contract's batch variant of the same assignment, at the proxy 0x1d1e8C85A2C99575fCb95903C9aD9Ae2aDEA54fc backed by implementation `0xf282737992Da4217bf5f8B6AE621181e84d7d3b9`. The attack it reconstructs:
setBatchAddress() naming both SQContracts.StakingManager and SQContracts.RewardsDistributor, pointing both roles at the attacker's own contract.RewardsDistributor, called the Staking proxy's unbondCommission() for the full SQT balance it held, opening an unbond request against the entire pooled balance.StakingManager, immediately called withdrawARequest() against that same request, which the Staking contract trusted because the caller matched the address it had just been told, via Settings, to treat as its manager. The withdrawal paid out to the attacker's contract.StakingManager and RewardsDistributor addresses in Settings, leaving the registry looking untouched to anyone checking it afterward.0x910175f3fee798ADD5faBD3e9cbB63D0a785482C.Basescan's record of this specific transaction, at block 44,590,469 on April 12, 2026 at 05:04:45 UTC, shows 218,070,478.04 SQT moving to a temporary contract and back to the attacker in the same call, alongside a small 218,288.77 SQT transfer, and confirms two contracts were created and then self-destructed within it, consistent with the trace cleanup the proof of concept reproduces.
This transaction is only part of what happened that day. SubQuery's own disclosure states that five separate transactions exploited the same Settings bug on April 12: two, including the one this proof of concept reproduces, drained a combined 230 million SQT from pooled staking balances using temporary, self-destructing contracts; a third pulled 129.5 million SQT from 272 individual delegator wallets using EIP-7702 code delegation on a self-owned address; a fourth took about 22.8 million SQT from the RewardsBooster module through SQToken address manipulation; and a fifth moved a small Treasury amount through StateChannel impersonation. SubQuery's reported total across all five is 382,433,441 SQT, about $134,000 at the time, against DeFiHackLabs's 218.07M SQT figure for this transaction alone. SubQuery's report does not name an attacker address for any of the five, so whether one party ran all five or several did is not established by that source.
SubQuery's response, per its own report, was to add onlyOwner modifiers to the vulnerable functions, then credit every affected wallet automatically on-chain, with distribution beginning April 14 and completing by April 15, and to resume withdrawals and normal operations once that compensation finished. No bounty or law-enforcement referral was mentioned.
What would have prevented it is the modifier that was simply missing: setContractAddress() and setBatchAddress() both needed to be owner-only from the Settings contract's deployment, the way the same contract's renounceOwnership() and transferOwnership() already were. An access-control gap on a single registry function was enough to let an outside caller reassign every privileged role the rest of the protocol trusted that registry to report correctly.
Query every incident yourself — free, no signup
Updated 9 Nov 2026. Figures are as reported by the sources listed above and are not independently verified.