# Burp Community OpenAPI site-map action reads a local schema example through $id rebasing

Burp Community's OpenAPI site-map action parses a different schema object than the validator, letting a malicious response rebase a fragment $ref against a local file:/// $id and leak a local schema example into a generated request.

- Payout: $1,000
- Severity: medium
- Program: PortSwigger
- Found by: 1rhino2
- Disclosed: 2026-11-13
- Write-up quality: 8/10
- Original: https://hackerone.com/reports/4000535
- Library page: https://bugbountylibrary.com/r/h1%3A4000535
- Tags: area:os domain:desktop impact:data-leak kind:bounty platform:hackerone sev:medium tech:java technique:chained technique:parser-differential technique:source-review vuln:info-disclosure vuln:path-traversal

**Target:** Burp Community OpenAPI site-map message action
**Root cause:** The validator unwraps a nested swaggerDoc (3.0) to enable the action, but the click handler parses the top-level 3.1 object; the external-reference check only scans $ref, not a local file:/// base in $id, so the 3.1 resolver rebases a fragment-only $ref onto the local file and reads it.
**Steps:**
1. Serve an HTTP response containing both a nested OpenAPI 3.0 `swaggerDoc` (to pass validation) and a top-level 3.1 object whose `$id` is `file:///...local-schema.json` and whose `$ref` is fragment-only `#/secret`.
2. In Burp Community, fetch the response through the proxy and select it in Target > Site map.
3. Open the Response message-actions menu and click `Save OpenAPI requests to site map`.
4. Burp parses the top-level 3.1 object, rebases `#/secret` against the `file:///` `$id`, reads the local schema, and copies the selected `example` into a generated `POST /collect` body.
5. Send the generated request via Repeater; the definition-selected server receives the leaked marker.
**How found:** Noticed validator and click parser select different OpenAPI-shaped objects from the same response; hypothesized a nested swaggerDoc could enable the action while the top-level 3.1 object drives parsing, then tested whether $id rebasing bypasses the $ref-only external-reference check.
**Exploitation:** Attacker controls an HTTP response the user views in Burp. On user click of the site-map action, Burp reads a known/guessable local JSON schema's `example` value and embeds it in a generated request to the attacker-selected server; the value is exfiltrated only if the user later sends that request.
**Insight:** When a feature validates one document shape but parses another, look for a parser-differential: here a nested 3.0 swaggerDoc gates the UI while the top-level 3.1 object is parsed, and $id rebasing turns a benign fragment-only $ref into a local file read that the $ref-only external check misses.

## Proof of concept (copied exactly from the original report)

**Loopback fixture serving malicious OpenAPI response**

```
python3 repro_server.py --mode exploit --schema local-schema.json

It prints a random `definition_url`. Keep this process running.
```

**Fetch malicious response through Burp proxy**

```
curl --noproxy '' --proxy http://127.0.0.1:8081 -H 'X-HackerOne-Research: 1rhino2' http://127.0.0.1:<PORT>/openapi.json
```

**Direct external reference control rejected**

```
python3 repro_server.py --mode direct-control --schema local-schema.json

The action is visible, but Burp rejects the definition with:

This definition can't be uploaded as it links to one or more external API definitions. Review the definition and remove the external links.

No collector request is generated and the fixture receives no POST.
```

