Skip to content
XSS Write-up Intermediate

HackerOne HTML Injection Fix Bypass‍

After HackerOne patched an HTML injection issue, the author tested the fix and found that the Markdown parser accepted extra quotes and arbitrary attributes inside a link, generating unintended HTML. The issue was not directly exploitable but could lead to content spoofing and client-side problems.

ahmedbelahcen2018 Follow

Published on medium.com

In 2016, after HackerOne patched an HTML injection issue, I decided to test the fix instead of moving on. The idea was simple:

ab.infosec, 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 parser did not properly validate or escape quotes and attributes in link titles, allowing arbitrary HTML attributes to be injected into the generated anchor tag.

Impact

The issue was not directly exploitable, but arbitrary HTML generation could lead to content spoofing and client-side issues.

What the attacker needed

Ability to submit Markdown input

The fix

HackerOne reverted the fix and implemented a safer solution.

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.

Markdown is a simple way to format text, and a parser turns it into HTML for the browser. The author found that by adding extra quotes and attributes to a Markdown link, the parser produced HTML it should not have, which could let an attacker fake page content. The bug was not directly exploitable but showed the fix was flawed.

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 ahmedbelahcen2018

View all

3 more disclosed reports, 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.