TOCTOU Vulnerability in Jupiter Mobile & Wallet Extension Due to Missing Execution-Time Assertion Checks
Jupiter Mobile (iOS, Android) and Jupiter Wallet Extension do not implement execution-time assertion checks on transactions, making them vulnerable to a Time-of-Check to Time-of-Use (TOCTOU) attack. This allows a malicious dApp to drain a user's wallet while the transaction simulation displays a positive balance change.
The root cause is the absence of Lighthouse (https://github.com/Jac0xb/lighthouse). For context, Phantom and Solflare mitigate this attack by implementing it.
When a user signs a transaction, Jupiter simulates the transaction against the current blockchain state (S₀) and displays the predicted outcome to the user. However, the actual execution occurs against a different state (S₁). If S₀ ≠ S₁, the simulation no longer reflects what will actually happen on-chain.
An attacker can deliberately engineer this state difference using Jito bundles, causing the wallet to display "+1 SOL, +500 USDC" (or any positive outcome) while the executed transaction drains the user's entire wallet. The user does everything correctly: they check the simulation, see a favorable outcome, and sign. They still lose all their funds.
This undermines the trust that users have in transaction simulation results.
Note: Since I could not attach videos for PoC, I attached some screenshots from the videos.
Mobile (iOS) test txid:
https://solscan.io/tx/VVMJyaMbHpiUSSuwTUNooVut9qfQbRfRP5HD9Zj3jRDfZSxTQ2fBWTxkdorG9Zc782BZG6oxGnD1sE1PEvc5GpW
Extension test txid:
https://solscan.io/tx/2thfMgBMhBTFNqgc6PaPCbVBY8XU3VSie4qL43TVxk4KiZTeNYWKgQsN8f7jUsvxUbDya4XLeobXeNZBvM3C4V1q