ONTR Token Exploit Drains 49.4801 WETH After Access Control Flaw

According to SlowMist, the attacker bypassed an onlyOwner access check when the contract owner was set to address(0), then converted inflated tokens into Wrapped Ether through PancakePair.

WETH

Summary

SlowMist said an access control flaw in the ONTR token contract allowed an attacker to steal 49.4801 WETH, worth about $98,000. The issue stemmed from the contract’s onlyOwner check failing when the owner was address(0), which let the attacker call privileged functions without authorization. SlowMist said the attacker then inflated token balances through contract functions and swapped the tokens for WETH through PancakePair. The incident highlights how misconfigured ownership logic can undermine smart contract security and allow unauthorized minting or balance manipulation.

Terms & Concepts
  • onlyOwner: A smart contract access control modifier that restricts certain functions to the contract owner.
  • address(0): The null blockchain address, commonly used as a default or uninitialized value in smart contracts.
  • WETH: Wrapped Ether, a tokenized version of Ether used in decentralized trading and smart contract applications.