Skip to content
XSS Write-up Beginner

Yeah I got p2 in 1 minute stored XSS via markdown editor

A stored cross-site scripting vulnerability existed in a markdown editor because user-supplied link URLs were not properly sanitised, allowing an attacker to inject an event handler that executed when a victim hovered over the rendered link. An attacker could run arbitrary JavaScript in the context of the application.

Schopath Follow

Published on medium.com

Hello! I want to tell about my Bug Bounty Write-up, that was my fastest finding which has HIGH severity (P2).

November Rain, on 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 markdown renderer failed to sanitise or escape user-controlled URL attributes, allowing event handlers to be injected into the generated HTML.

Impact

An attacker could execute arbitrary JavaScript in the context of the application when a victim interacts with the stored content, potentially leading to account compromise or data theft.

What the attacker needed

Ability to submit markdown content; victim hovers over the link

How it was found

  1. Create a report or comment using the markdown editor.
  2. Insert a markdown link whose URL contains an event handler.
  3. Submit the report.
  4. Hover over the rendered link to trigger the script.

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.

Cross-site scripting (XSS) is when a website displays user input without cleaning it, so an attacker can sneak in code that runs in other visitors' browsers. Here, a markdown editor let a crafted link include an event handler that ran when someone hovered over it. This could let an attacker act as the victim on the site.

What is XSS?

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

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.