Killua
← All parts Bug Hunting Field Guide · Part 2 of 8

Permissionless executors: borrowed authority and confused deputies

Killua · 7 min read

Authorization answers “who is acting?”. An open executor lets the attacker choose a powerful answer. Every check downstream then passes honestly, for the wrong principal.

A contract that runs anyone’s calldata while keeping its own identity lets strangers spend its authority. That’s the whole bug. This guide shows how it plays out, why it’s critical by default, and how to tell it apart from the many safe contracts that look the same.

The bug in one sentence

A contract with authority (funds, approvals, NFTs or a trusted role) forwards caller-supplied calldata to other contracts, so those contracts see the forwarder as the caller and grant the attacker everything the forwarder is allowed to do.

When contract A calls contract B, B checks permissions against A’s address. If A will forward any bytes an unauthenticated caller hands it, A is a confused deputy. B’s checks are correct. They’re just answering for the wrong party.

A real case: Unistreets launchpad (Ethereum, August 2026, about $17.7K plus memecoins)

Unistreets was a one-transaction memecoin launchpad. Its LaunchpadFactoryAuto minted a Uniswap V4 LP position for each launch and kept every position NFT itself. At attack time it held 15 live positions.

Its launch() function forwarded two caller-supplied calldata blobs straight into the V4 position manager:

positionIdOf[token] = IPositionManager(POSITION_MANAGER).nextTokenId(); // factory will own this LP
bytes[] memory calls = new bytes[](2);
calls[0] = initCalldata;    // caller-supplied
calls[1] = modifyCalldata;  // caller-supplied, never checked
IPositionManager(POSITION_MANAGER).multicall(calls); // runs as the factory

There was no allowlist and no selector check. And Uniswap V4’s Multicall_v4 runs each entry with a self-delegatecall:

address(this).delegatecall(data[i]); // msg.sender inside is still the factory

So inside the payload, msg.sender is still the factory.

The attacker passed one blob, setApprovalForAll(exploit, true). It ran as the factory and made the attacker’s contract an approved operator over every NFT the factory owned. The position manager’s own approval check then passed, correctly, for all 15 positions. The exploit burned each position, took both sides of the liquidity, and walked away with about 17,743 USDC, a little WETH and seven memecoins. One decoy launch unlocked everything the factory held.

Why this is almost always total loss

Let A be everything reachable under the executor’s identity: balances, approvals pointing at it, NFTs it owns and roles it holds. Let C be the gas for one call.

profit ≈ A − C

There’s no dependence on pool depth, timing or counterparties. With a spot-price bug, profit is limited by how far you can move a pool. Here the ceiling is the deputy’s entire authority. That’s why this class is critical by default, and why the fix is never “add liquidity” but “remove the authority or close the entry point”.

The attack, step by step

  1. Deploy. The attacker deploys an exploit contract whose constructor runs the whole attack.
  2. Trigger. Call factory.launch(...) with a decoy token and modifyCalldata = setApprovalForAll(exploit, true).
  3. Hijack. The position manager’s multicall delegatecalls the payload. The approval is written as the factory.
  4. Drain. Loop over all factory-owned positions and burn each one, taking the liquidity.
  5. Extract. Send the USDC, WETH and tokens to the attacker’s wallet.

Why it worked: three facts

  1. Open entry point. Caller bytes are forwarded with no sender check and no allowlist.
  2. Borrowed identity. The inner protocol authorizes the executor, using its NFTs, approvals or trusted status.
  3. Valuable targets. Privileged calls such as approve, burn, sweep or admin functions are reachable.

Remove any one and it’s safe. Gate the entry and nobody can steer it. Strip the authority and an open forwarder that holds nothing is just Multicall3, harmless by construction. Or scope every action to the submitter’s own position, so there are no third-party parameters to abuse.

How to hunt for it

Lookalikes that are safe, and why

Fixes that work, and which fact each one kills

The same bug in other clothes

Test yourself

  1. An open multicall with no auth that holds nothing and is registered nowhere. Finding? No, because it has no authority. Re-check after every integration, because authority builds up.
  2. The batch is owner-gated, but a public rescueERC20 forwards arbitrary calldata. Finding? Possibly critical. The gate has to cover every path to the forwarder. Read the rescue function’s body, not its name.
  3. The executor authenticates callers and passes the original sender to subcalls. Verdict? Safe on both counts. Two ingredients fail independently.
  4. Victim approvals exist on-chain, but you only have the source. Clean? Not yet. Mark it as suspected and name the standing approvals. Source alone can’t see chain-state authority.
  5. Your fork test only drains the executor’s dust. Report? Report what the evidence supports. Severity follows reachable authority, not the pattern’s name.

Recap