# Unverified key trusted as unique and owner-bound

Stored or looked-up hash, id or index trusted without recomputing it from the real data and owner

_Area: Smart contract access control and control flow. Seen in 11 disclosed reports; latest 2026-09-26. Updated 2026-10-23._

## How it works
A contract or service stores or looks up an identifier (tx hash, order hash, request id, peer key) as if it were unique, authoritative and bound to its owner. Nothing recomputes it from the data it names, or checks it against the real record. Because the key is caller- or prover-chosen, an attacker can pick a value that collides with, shadows, or diverges from the victim's real entry: the victim's operation resolves to the wrong record, or the attacker's record wins the slot first. Divergence counts too: a stored key that no longer matches the data it names makes the victim's operation unfillable or unresolvable [E6](https://bugbountylibrary.com/r/cantina%3Agenius_jul2025%3A3.1.2.md). The boundary: the key is trusted as unique and authoritative without being derived from, or checked against, the real data and its owner. Plain missing validation (no key at all) is a different bug.

## Where it shows up
- A hash or id parameter written to storage without recomputing it from the accompanying data [E6](https://bugbountylibrary.com/r/cantina%3Agenius_jul2025%3A3.1.2.md).
- First-writer-wins maps keyed only on a nonce, with no sender or payload check [E2](https://bugbountylibrary.com/r/c4%3A2023-11-zetachain%3AH-11.md).
- Fixed index used to claim from a permissionless queue, e.g. `getWithdrawalRequests[0]` [E3](https://bugbountylibrary.com/r/sherlock%3A2024-06-leveraged-vaults%3AH-13.md).
- Bridge mint functions accepting (from, txid) without oracle confirmation of a real deposit [E4](https://bugbountylibrary.com/r/dhl%3A20260515-adsharesbridge.md).
- Registration trusting a caller-supplied contract's getters for shared tokens [E1](https://bugbountylibrary.com/r/dhl%3A20260926-daostack.md).
- User-supplied hash used as a unique DB key, only format-checked [E7](https://bugbountylibrary.com/r/cantina%3Ababylon_may2024%3A3.1.4.md).
- Map `.Set` keyed by a user-supplied peer key with no ownership proof [E8](https://bugbountylibrary.com/r/sherlock%3A2024-06-allora%3AH-13.md).
- Detection: grep for stored hash params not recomputed, `[0]` claims on permissionless queues, mint functions taking a txid with no oracle check, `.Set(ctx, msg.` on user-supplied keys.

## How to review
The invariant: every stored or looked-up key must be derived from, or verified against, the authoritative data, and bound to its owner. Check that hashes are recomputed on-chain and compared [E6](https://bugbountylibrary.com/r/cantina%3Agenius_jul2025%3A3.1.2.md); first-writer maps validate sender and payload, not just the nonce [E2](https://bugbountylibrary.com/r/c4%3A2023-11-zetachain%3AH-11.md); queue claims use the returned requestId, never a fixed index [E3](https://bugbountylibrary.com/r/sherlock%3A2024-06-leveraged-vaults%3AH-13.md); mint authority requires a confirmed source-chain record [E4](https://bugbountylibrary.com/r/dhl%3A20260515-adsharesbridge.md); registration verifies caller-supplied getters against already-governed state [E1](https://bugbountylibrary.com/r/dhl%3A20260926-daostack.md); user-supplied hashes are cross-checked against the object they name before becoming unique keys [E7](https://bugbountylibrary.com/r/cantina%3Ababylon_may2024%3A3.1.4.md); map writes prove the caller owns the key [E8](https://bugbountylibrary.com/r/sherlock%3A2024-06-allora%3AH-13.md).

## Variants seen
- Nonce-only tracker key, front-run with a fake reverted tx [E2](https://bugbountylibrary.com/r/c4%3A2023-11-zetachain%3AH-11.md).
- Dust request at index 0 shadows the real withdrawal [E3](https://bugbountylibrary.com/r/sherlock%3A2024-06-leveraged-vaults%3AH-13.md).
- Fake bridge deposit mints tokens [E4](https://bugbountylibrary.com/r/dhl%3A20260515-adsharesbridge.md).
- Mismatched order hash makes orders unfillable (divergence, not collision) [E6](https://bugbountylibrary.com/r/cantina%3Agenius_jul2025%3A3.1.2.md).
- Getter spoofing: fake avatar getters hijack a shared Reputation [E1](https://bugbountylibrary.com/r/dhl%3A20260926-daostack.md).
- Hash squatting: attacker pre-inserts the victim's staking tx hash as a unique DB key [E7](https://bugbountylibrary.com/r/cantina%3Ababylon_may2024%3A3.1.4.md).
- Peer-key overwrite: `.Set` on a user-supplied LibP2PKey with no ownership check [E8](https://bugbountylibrary.com/r/sherlock%3A2024-06-allora%3AH-13.md).

## Impact and severity
Ranged from permanent fund loss and double spend [E2](https://bugbountylibrary.com/r/c4%3A2023-11-zetachain%3AH-11.md)[E3](https://bugbountylibrary.com/r/sherlock%3A2024-06-leveraged-vaults%3AH-13.md)[E4](https://bugbountylibrary.com/r/dhl%3A20260515-adsharesbridge.md) to order DoS and locked funds [E6](https://bugbountylibrary.com/r/cantina%3Agenius_jul2025%3A3.1.2.md), governance takeover draining ETH [E1](https://bugbountylibrary.com/r/dhl%3A20260926-daostack.md), blocked unbonding [E7](https://bugbountylibrary.com/r/cantina%3Ababylon_may2024%3A3.1.4.md), and overwritten node records [E8](https://bugbountylibrary.com/r/sherlock%3A2024-06-allora%3AH-13.md). Severity rises when the key gates minting or withdrawal authority, and when abuse is free or cheap: E2 and E4 need no fee or collateral; E3's dust is cheap but not free.

## Evidence
- E1: https://bugbountylibrary.com/r/dhl%3A20260926-daostack.md
- E2: https://bugbountylibrary.com/r/c4%3A2023-11-zetachain%3AH-11.md
- E3: https://bugbountylibrary.com/r/sherlock%3A2024-06-leveraged-vaults%3AH-13.md
- E4: https://bugbountylibrary.com/r/dhl%3A20260515-adsharesbridge.md
- E5: https://bugbountylibrary.com/r/c4%3A2022-10-holograph%3AH-04.md
- E6: https://bugbountylibrary.com/r/cantina%3Agenius_jul2025%3A3.1.2.md
- E7: https://bugbountylibrary.com/r/cantina%3Ababylon_may2024%3A3.1.4.md
- E8: https://bugbountylibrary.com/r/sherlock%3A2024-06-allora%3AH-13.md
