# Arbitrary tokens and data can be bridged to GnosisTargetDispenserL2 to manipulate staking incentives

GnosisTargetDispenserL2's onTokenBridged callback never validates the L1 sender, so anyone can bridge arbitrary tokens with fake data to redirect withheld staking incentives.

- Payout: Audit contest
- Severity: high
- Program: Olas
- Found by: EV\_om
- Disclosed: 2024-08-06
- Write-up quality: 7/10
- Original: https://github.com/code-423n4/2024-05-olas-findings/issues/22
- Library page: https://bugbountylibrary.com/r/c4%3A2024-05-olas%3AH-02
- Tags: area:web3 domain:web3 impact:funds-loss impact:integrity kind:contest platform:code4rena sev:high tech:evm technique:source-review vuln:access-control vuln:business-logic

**Target:** GnosisTargetDispenserL2 bridge receiver callback (Omnibridge/AMB)
**Root cause:** onTokenBridged() invokes _receiveMessage() without verifying the L1 sender or the bridged token, so attacker-supplied payloads are treated as authentic staking data.
**Steps:**
1. Call `relayTokensAndCall()` on Omnibridge on L1, sending any token to GnosisTargetDispenserL2 on L2.
2. Embed malicious staking target/incentive data in the `payload` parameter.
3. onTokenBridged() fires on L2 and calls `_receiveMessage()` -> `_processData()`.
4. Payload passes `_processData()` checks; incentives are distributed or nonces stored in `stakingQueueingNonces` for later redemption.
**How found:** Code review of the bridge callback path: noticed onTokenBridged() lacked sender/token validation before calling _receiveMessage(), and that Omnibridge does not expose the original L1 sender in the receiver callback.
**Exploitation:** Attacker bridges a trivial amount of any token with crafted payload; the unauthenticated callback processes it, redistributing any withheld funds to attacker-chosen targets or queueing nonces for later redemption.
**Insight:** When a contract accepts cross-chain callbacks, check whether the bridge primitive actually authenticates the L1 sender; Omnibridge's token-bridge callback does not, so token+data must be split (tokens via relayTokens, data via AMB requireToPassMessage).

