
On April 12, 2026, three separate transactions exploited a vulnerability in the SubQuery Network’s Settings contract on the Base network, resulting in the unauthorized drainage of 359,614,732 SQT tokens. The exploit affected the Staking contract’s pooled SQT balances (TX1 and TX2) as well as 272 individual staker and delegator wallets (TX3).
No user private keys were compromised. The root cause was an internal smart-contract configuration issue that we have now fully resolved. We are committed to transparency, rapid recovery, and preventing recurrence. Below is a complete, factual account based on our on-chain investigation (including full Tenderly traces).
The vulnerability was a missing onlyOwner access control modifier on the setContractAddress() function (selector 0xc413e5be) in the Settings contract implementation.
This function allows any caller to update the registered addresses for critical roles in the SQContracts enum (including StakingManager = sq=2 and RewardsDistributor = sq=8). The absence of the modifier meant the function could be called permissionlessly, bypassing the intended owner-only protection that existed elsewhere in the system.
The vulnerability has been present since the contract was deployed and was not introduced by any recent change. We have since added the onlyOwner modifier to both setContractAddress() and the related setBatchAddress() function.
setContractAddress().TransparentUpgradeableProxy at 0x7A68b10Eb116a8b71a9b6f77b32b47eb591B6Ded): The contract that held all staked and delegated SQT. Its implementation is at 0xf6c913c506881d7eb37ce52af4dc8e59fd61694d.MAX_UINT approvals to the Staking proxy).No other contracts were modified or exploited.
All three attacks used the same missing access-control gap but employed slightly different delivery mechanisms. The core path was:
setContractAddress(sq=2, attacker-controlled-address) to register themselves (or a temporary contract) as the StakingManager.transferDelegationTokens(address _source, uint256 _amount) – moves SQT from any address that has approved the Staking proxy.withdrawARequest(address _source, uint256 _index) – executes withdrawals. setContractAddress(sq=8, attacker-controlled-address) to register as RewardsDistributor.unbondCommission() to create a Commission-type unbonding request (bypassing normal delegation checks).withdrawARequest() (still as StakingManager) to drain the accumulated SQT from the Staking contract, minus the standard 0.1% treasury fee.TX1 & TX2 (pooled balance drain, ~230M SQT total) used temporary contract creation + selfdestruct.
TX3 (individual wallets, 129,494,294 SQT) used EIP-7702 code morphing on an address the attacker had owned for ~1.5 years. No phishing or key compromise occurred – the attacker self-authorized the morph.
The SubQuery ecosystem underwent two security audits:
The vulnerability was inadvertently introduced during a code refactor after the first audit. The second audit was scoped to other components and did not re-examine the settings contract.
We are now conducting a full review of all contracts to ensure no similar gaps exist.
onlyOwner modifier to setContractAddress() and setBatchAddress() in the Settings contract.StakingManager and RewardsDistributor addresses immediately after the incident.The root cause of the vulnerability has been fixed. In addition, several other mitigations are being implemented to prevent similar issues in the future.
The following fixes are already planned or in progress:
Beyond these immediate code-level fixes, we have also performed an additional security scan using AI to identify potential vulnerabilities that traditional audits might miss.
We are making whole every affected user. No staker or delegator will bear any loss from this incident.
This incident is very unfortunate and we apologize to every member of the SubQuery community whose trust was impacted. We have acted swiftly to contain the exploit, restore the affected contracts, and prepare full compensation.
We will continue to provide regular updates via our official channels. Thank you for your patience and continued support.
— The SubQuery Team
SubQuery is building the foundational data layer of Web3 — open, scalable, and designed for the AI-driven future.
SubQuery Network provides decentralised data indexers and dRPCs that power thousands of dApps across nearly 300 networks. With AI-assisted tools in the SubQuery SDK and Model Context Protocol (MCP) integration, developers can easily build, deploy, and scale blockchain data infrastructure.
AskSubQuery.xyz provides graphql query MCP as a service. It is also the first product to connect to Hermes Subnet as an Authorized Caller.
With SubQuery, you can unlock intelligence in blockchain data.
Linktree | Website | Discord | Telegram | Twitter | Blog | Medium | LinkedIn | YouTube


