# Unverified proxy selector and target dispatch

Proxy or forwarder dispatching to a caller-influenced target or selector not bound to a trusted implementation

_Area: Smart contract access control and control flow. Seen in 3 disclosed reports; latest 2026-09-16. Updated 2026-11-28._

## How it works
A proxy, forwarder or handler is meant to be a thin trusted shim: it receives a call, checks who may make it, then hands control to a fixed implementation. The assumption that breaks is that the dispatch target or selector is fixed and trusted. When the target contract, the paymaster, or the function selector is taken from the caller (or from a relay the caller controls) and is not bound to a known-good implementation, the caller chooses which code runs. Any check that lives inside the *dispatched* code — a fee, a signature check, an ownership check — becomes optional, because the caller can dispatch to code that omits it.

## Where it shows up
- `delegatecall`/`call` where the target address comes from calldata or a user-set field [E3](https://bugbountylibrary.com/r/c4%3A2023-10-opendollar%3AM-07.md).
- A proxy pointing at an unverified implementation, exposing selectors nobody has audited [E2](https://bugbountylibrary.com/r/dhl%3A20250822-unverified-6f7a.md).
- A contract that is simultaneously forwarder, paymaster and recipient, with verification split across entrypoints [E1](https://bugbountylibrary.com/r/dhl%3A20260916-nimiq.md).
- Forwarder `execute()`-style entrypoints that decode only `request.data` and skip signature, nonce or domain checks [E1](https://bugbountylibrary.com/r/dhl%3A20260916-nimiq.md).
- Fee or accounting logic living in a helper reached by delegatecall rather than in the state-changing entrypoint [E3](https://bugbountylibrary.com/r/c4%3A2023-10-opendollar%3AM-07.md).
- A selector that moves or processes token balances without tying the amount to `msg.sender` [E2](https://bugbountylibrary.com/r/dhl%3A20250822-unverified-6f7a.md).

## How to review
For every dispatch, ask: is the target/selector bound to a trusted, immutable or governance-set implementation, or can the caller influence it? The invariant: **the code that enforces authorization, fees and accounting must be the code that actually runs, and the caller must not be able to substitute it.** Check that the forwarder entrypoint itself verifies signature, nonce and domain separator rather than delegating to `preRelayedCall()` [E1](https://bugbountylibrary.com/r/dhl%3A20260916-nimiq.md). Check that token amounts are tied to `msg.sender` [E2](https://bugbountylibrary.com/r/dhl%3A20250822-unverified-6f7a.md). Check that fees are enforced in the entrypoint, not only in a delegatecall helper [E3](https://bugbountylibrary.com/r/c4%3A2023-10-opendollar%3AM-07.md). Enumerate every exposed selector on unverified proxies [E2](https://bugbountylibrary.com/r/dhl%3A20250822-unverified-6f7a.md).

## How finders spotted it
- Recognized the handler was its own forwarder, paymaster and recipient, and that `execute()` discarded signature/domain/nonce while `preRelayedCall()` held all verification; since RelayHub lets any staked relay pick any (paymaster, forwarder) pair, an attacker paymaster bypasses the check [E1](https://bugbountylibrary.com/r/dhl%3A20260916-nimiq.md).
- Noticed an unverified proxy exposed selector `0xbfd479c4` accepting an arbitrary token list and amount without checking `msg.sender` [E2](https://bugbountylibrary.com/r/dhl%3A20250822-unverified-6f7a.md).
- Code reading: saw tax paid inside `BasicActions` rather than `ODSafeManager`, and that `ODProxy` delegatecalls to a caller-supplied target [E3](https://bugbountylibrary.com/r/c4%3A2023-10-opendollar%3AM-07.md).

## Variants seen
- Forwarder/paymaster trust split across entrypoints [E1](https://bugbountylibrary.com/r/dhl%3A20260916-nimiq.md).
- Unverified proxy with an unauthenticated balance-moving selector [E2](https://bugbountylibrary.com/r/dhl%3A20250822-unverified-6f7a.md).
- User-controlled delegatecall target skipping a fee [E3](https://bugbountylibrary.com/r/c4%3A2023-10-opendollar%3AM-07.md).

## Why fixes fail
Verification placed only in `preRelayedCall()` is bypassed whenever the paymaster is attacker-chosen [E1](https://bugbountylibrary.com/r/dhl%3A20260916-nimiq.md); fee logic only in the delegatecall helper is advisory [E3](https://bugbountylibrary.com/r/c4%3A2023-10-opendollar%3AM-07.md).

## Impact and severity
Drained standing token approvals (~$50k) [E1](https://bugbountylibrary.com/r/dhl%3A20260916-nimiq.md); drained victim DAI/WETH/FEI balances, profited via flash swap [E2](https://bugbountylibrary.com/r/dhl%3A20250822-unverified-6f7a.md); tax bypass [E3](https://bugbountylibrary.com/r/c4%3A2023-10-opendollar%3AM-07.md). Impact rises when the dispatch reaches live balances or approvals and when the attacker can pick the target freely.

## Evidence
- E1: https://bugbountylibrary.com/r/dhl%3A20260916-nimiq.md
- E2: https://bugbountylibrary.com/r/dhl%3A20250822-unverified-6f7a.md
- E3: https://bugbountylibrary.com/r/c4%3A2023-10-opendollar%3AM-07.md
