Skip to content
XSS Write-up Beginner

My first bounty from Hackerone | $100 Code Injection on AI bot

An AI feature on a resume-building website rendered user-supplied HTML, so an attacker could inject an iframe and then load a malicious PDF from a CDN to achieve script execution. The impact was limited because the injected content only affected the attacker's own session and not other users.

infosecwriteups.com

Published on infosecwriteups.com

I found a very popular website which people use it to make resumes. I mailed them a bug (duplicate) and in reply they added me to their hackerone programme.

StvRoot, on infosecwriteups.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 AI feature echoed user input into the page as raw HTML without sanitising it, allowing injected markup and script-bearing content to render.

Impact

Script execution occurred only in the attacker's own session, so other users were not affected and the severity was rated Low.

What the attacker needed

Access to the AI feature; attacker controls a hosted file

How it was found

  1. Send HTML markup to the AI bot and observe that it is rendered.
  2. Confirm an iframe element loads an external page.
  3. Host a malicious PDF on a CDN and embed it in an iframe to trigger script execution.

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.

The site's new AI helper displayed whatever HTML a user typed back to that same user without cleaning it. HTML is the language web pages are built from, and an iframe is a box that loads another page inside the current one. By pointing that box at a file the attacker controlled, they could run their own code in the page, which is called cross-site scripting (XSS).

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.