When “Safe” Isn’t Safe: Turning a Simple HTML Injection int
A client_id parameter on an authentication endpoint was reflected into the HTML response without encoding, allowing arbitrary HTML to be rendered. An attacker could display fake messages or inject links on a trusted login page to aid phishing.
In bug bounty hunting, not every vulnerability needs flashy payloads or JavaScript execution to matter. Sometimes, the simplest flaws — when placed in the right context — can quietly undermine user trust.
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
The endpoint inserted the client_id value directly into the HTML response without output encoding or sanitisation.
Impact
Users could see attacker-controlled content, fake messages and malicious links on a trusted authentication page, increasing phishing risk; script execution was blocked, so the impact is limited to HTML injection.
What the attacker needed
Victim clicks a crafted link
How it was found
- Notice that the client_id parameter is reflected in the response.
- Send a simple HTML heading and paragraph as the client_id value, URL-encoded.
- Observe that the page renders the HTML directly.
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.
When a website takes something you type in the address bar and puts it straight into the page without cleaning it, you can make the page show your own content. Here the parameter was on a login-related page, so an attacker could make the real site display fake warnings or links. It is not script execution, but it still tricks people because the page looks trustworthy.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.