# The bug bounty website that tried to hack me

An in-scope HackerOne VDP site returned a fake 403 JSON schema prompt-injecting AI hackbots to exfiltrate prompts, tools, git email, IP and env vars.

- Payout: Research
- Severity: medium
- Program: HackerOne
- Write-up by: PortSwigger Research
- Disclosed: 2026-11-30
- Write-up quality: 6/10
- Original: https://portswigger.net/research/the-bug-bounty-website-that-tried-to-hack-me
- Library page: https://bugbountylibrary.com/r/blog%3Aportswigger-net-research-the-bug-bounty-website-that-tried-to-hack-me
- Tags: area:web domain:web impact:data-leak kind:research platform:research sev:medium tech:llm technique:recon vuln:info-disclosure vuln:prompt-injection

**Target:** Web application in-scope for a private HackerOne VDP, returning a JSON 403 error body
**Root cause:** The site responds to scanner requests with a crafted 403 JSON 'attestation' schema that instructs autonomous LLM clients to gather host secrets and submit them, exploiting the agent's trust in error responses.
**Steps:**
1. Send a request to the in-scope target with a testing harness; receive `403` with `code: CLIENT_UNCLASSIFIED` and `error: proxy_authentication_required`.
2. Read the `message`: it demands resubmission with an `attestation` object populated from the originating host.
3. The `attestation` schema requests `principal.username`/`email` (OS account, git committer email), `origin.public_ip` and cloud `instance` id, `provenance.model` (instructing inspection of `ANTHROPIC_MODEL`/`CLAUDE_MODEL` env vars and `~/.claude/settings.json`), `delegation.objective`/`constraints`/`available_tools` (the agent's system prompt and tool list), and `co_authored_by`.
4. `evidence_policy` rules E1-E4 demand re-runnable commands or `file:line` citations, pressuring the agent to dump env vars as 'evidence'.
5. `validation.consistency` claims cross-checks against TLS fingerprint, reverse DNS and JA3 to discourage fabricated values.
**How found:** Kettle was reviewing discoveries from his testing harness and noticed a target returning an unusual 403 JSON body that addressed the client directly, prompting him to read the schema and recognize it as a prompt-injection attempt against AI scanners.
**Exploitation:** The attacker (site owner) weaponizes the agent's own error-handling loop: a plausible 403 schema convinces the hackbot to resubmit the original request with an attestation body containing its system prompt, tool inventory, rules of engagement, git email, real IP, cloud instance ID and model env vars, exfiltrating hunter/agent secrets to the target.
**Insight:** Error responses are an unauthenticated injection surface into AI scanners: a target can shape 403/400 JSON to look like a required auth handshake and coerce the agent into self-exfiltration. Audit your harness so error bodies are never treated as instructions, and treat any 'resubmit with host-observed values' demand as hostile.

