Skip to content
XSS Write-up Beginner

The Ultimate Guide to Chaining Bugs: How I Found a Reverse Shell in a Bug Bounty Program

A chatbot feature allowed HTML injection, which the researcher chained with an XSS payload to execute JavaScript when a user hovered over injected text. The attacker could read the victim's cookies, though the report does not demonstrate session hijacking or a reverse shell.

b0mk35h Follow

Published on b0mk35h.medium.com

In this article, I’ll share how I successfully chained an HTML injection into a XSS during a bug bounty program. Let’s dive in.

Pronay Biswas, on b0mk35h.medium.com

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 chatbot did not properly sanitise or encode user-supplied input before rendering it as HTML, allowing arbitrary HTML tags and event handlers.

Impact

An attacker could execute JavaScript in a victim's browser when the victim hovers over injected content, potentially reading cookies, though the report does not show session theft or a reverse shell.

What the attacker needed

Access to the chatbot feature; victim hovers over injected text

How it was found

  1. Visit the target subdomain and locate the chatbot feature.
  2. Test a script tag payload, which did not work.
  3. Inject an HTML heading payload, which worked.
  4. Inject a heading with an onmouseover event handler that calls alert with the domain.
  5. Hover over the injected heading to trigger the alert.
  6. Inject a similar payload that alerts the cookie value and hover to read it.

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 lets an attacker insert their own HTML tags into a web page. If the page also allows JavaScript in those tags, the attacker can run code in the victim's browser, which is called cross-site scripting (XSS). Here, the researcher first inserted a harmless heading, then added a hover event that ran JavaScript to show the user's cookies.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by b0mk35h

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.