# The worker and reputer's payload may be tampered due to lack of check for the pubkey's ownership

Allora's InsertBulkWorkerPayload/ReputerPayload verified signatures but not pubkey ownership, letting an adversary submit tampered data attributed to an innocent worker or reputer.

- Payout: Contest reward
- Severity: high
- Program: Allora
- Credited: lemonmon
- Disclosed: 2024-06-24
- Write-up quality: 7/10
- Original: https://github.com/sherlock-audit/2024-06-allora-judging/issues/124
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-06-allora%3AH-15
- Tags: domain:web3 impact:integrity kind:contest platform:sherlock sev:high tech:go technique:source-review vuln:access-control vuln:business-logic vuln:signature-replay

**Target:** Cosmos SDK emissions module message handlers (InsertBulkWorkerPayload, InsertBulkReputerPayload)
**Root cause:** Signature validation confirms the bundle was signed by the supplied Pubkey, but never verifies that Pubkey is registered to the claimed inferer/reputer, so any keypair can sign data attributed to another participant.
**Steps:**
1. Generate an adversary secp256k1 keypair distinct from the victim worker's key.
2. Build a valid worker payload bundle for the target topic/block height.
3. Sign the bundle with the adversary key and set the bundle's Pubkey to the adversary's pubkey while attributing data to the victim inferer.
4. Call `msgServer.InsertBulkWorkerPayload(ctx, &workerMsg)`; signature check passes and forecast is recorded as the victim's data.
5. Repeat against `InsertBulkReputerPayload` with a tampered ValueBundle.
**How found:** Code review of the Validate functions in worker_data_bundle.go and reputer_value_bundle.go: noticed signature verification used the provided Pubkey without binding it to the claimed signer identity, then wrote a Go test proving a mismatched keypair is accepted.
**Exploitation:** An adversary submits a bundle signed by their own key but attributed to an innocent worker/reputer; the chain accepts it and records the forged forecasts/losses under the victim's identity, affecting reward/punishment accounting.
**Insight:** When auditing signature checks, verify not just that the signature matches the supplied key, but that the key is bound to the claimed identity (registered/authorized pubkey lookup); mismatched-keypair tests expose this class quickly.
