XBridge Hack
Incident Overview
XBridge, a cross-chain platform connecting Ethereum Mainnet and BNB chain, experienced a significant smart contract vulnerability on April 24, 2024. This exploit resulted in a loss of assets totaling approximately $1.9 million. The vulnerability allowed the attacker to seamlessly take away assets from the protocol.
The exploit was rooted in a faulty smart contract implementation due to a lack of regulated access control. The attacker invoked a call to the vulnerable contract's withdrawTokens function, enabling them to extract assets from the protocol. Additionally, a flaw in the listToken function allowed anyone to set themselves as the token owner without verification, facilitating unauthorized access to assets.
Exploiter:
https://etherscan.io/address/0x0cfc28d1…e4caa7
Exploiter tx example:
https://etherscan.io/tx/0x903d88a9…109c92
Funds are held by exploiter on two networks:
https://etherscan.io/address/0x0cfc28d1…e4caa7
https://bscscan.com/address/0x0cfc28d1…e4caa7
Incident Report
Protocol Information
Market Context at Time of Hack
What the Attacker Needed to Succeed
Understanding the prerequisites for this type of attack helps auditors identify protocols that are most at risk and helps developers build better defenses.
What Auditors Should Check
If you're auditing a protocol with similar architecture to XBridge, these are the critical security checks that could have prevented this incident (April 2024).
- Verify all logic paths related to Access Control are guarded by proper access controls and input validation - see the Access Control Attacks attack class for patterns
- Review privileged functions (owner, admin, governance) for potential abuse vectors - centralization risks should be documented and bounded with timelocks or multi-sigs
Master these auditing techniques with hands-on labs and real exploit scenarios in the Smart Contract Hacking course.
Free TrialSecurity Audit History
- Audit Report 1 Report
Related Attack Classes
The technique used in this hack maps to these vulnerability classes in our security curriculum:
Proof-of-Concept Exploits
Sources & References
Learn to Prevent the Next XBridge
The XBridge hack is one of many attacks that skilled auditors are trained to detect before deployment. Master real exploit patterns and defense techniques with hands-on Web3 security training.