Using HTML as a ladder —
A parameter accepted arbitrary HTML without sanitisation, allowing HTML injection. The tester then used the injected HTML to make the server request an external Collaborator URL, demonstrating SSRF.
medium.com
Published on medium.com
Ever came across a parameter that accepts every kind of user response, even a string of special characters without any restrictions?
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the application stored user input without sanitising HTML and later rendered or processed it in a way that caused a server-side request.
Impact
The server could be made to send requests to an attacker-chosen address, which may enable port scanning, exposure of internal data, or denial of service.
What the attacker needed
A parameter that accepts unrestricted input; the input is stored and rendered or processed; an external server to receive requests
How it was found
- Find a parameter that accepts any input without restrictions.
- Confirm HTML injection by submitting a simple heading tag and seeing the stored text change.
- Insert the path of another server using HTML injection.
- Use a Collaborator URL as the target server and submit the request.
- Observe the request being redirected to Collaborator.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
HTML injection means a website puts user text into a page without cleaning it, so an attacker can add their own HTML tags. Here the tester added a tag that pointed at an outside server, and the application's server fetched that address, which is server-side request forgery (SSRF): the server makes a request the attacker chose.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.