Skip to content
XSS Write-up Intermediate

Bypass Rich Text Editors lead to Stored XSS - $500 Rewards

A rich text editor allowed data: URLs as image sources, and the author stored an SVG containing script that executed when the image was opened. The author also bypassed editor filtering by using a base64-encoded payload inside a hyperlink, leading to stored XSS.

medium.com

Published on medium.com

Hello guys๐Ÿ‘‹๐Ÿ‘‹ In this article, Iโ€™m going to talk about a How to bypass XSS and lead to StoredXSS bug I discovered in an HackerOne bug bounty program which i m going to represent as redacted that allowed me to get Reward $500.

bugbounty_learners, 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

Impact

An attacker could store a script that executes when a victim opens the image, potentially stealing cookies or performing actions as the victim, though the text does not specify the exact impact beyond script execution.

What the attacker needed

Access to a chat box with rich text editor; victim opens the stored image

How it was found

  1. Find the user's chat box.
  2. Try a simple SVG payload with an onerror handler, which did not work.
  3. Try using editor options like bold, italic, arrange, script, and hyperlink, but still not working.
  4. Use a base64-encoded payload with an image onerror handler that imports a data: URL script.
  5. Add a hyperlink around the payload and press enter.
  6. The script triggered, confirming stored XSS.

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.

A rich text editor is a box where you can format text, like in an email or chat. The editor let people add images using a special kind of link that contains the image data itself. The author hid a small script inside that image data, and when someone opened the image, the script ran in their browser. This is called stored cross-site scripting (XSS) because the harmful content is saved and later shown to others.

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.