Skip to content
XSS Disclosed report Beginner

ads.twitter.com xss

A cross-site scripting flaw existed in the card name field when creating or cloning a card on Twitter's ads platform. An attacker could inject script that persisted and executed when the card was viewed, potentially stealing cookies.

arbitrarycode Follow

Originally disclosed on HackerOne

  • Triaged in under an hour
  • Fixed in 2 hours
  • Paid in 4 days
  • Disclosed after 2 months

Cross-Site Scripting vulnerability exists in card[name] parameter when creating/cloning a card via script https://ads.twitter.com/accounts/18ce53wrkma/cards/new?card_type=7. Here is the simple test vector: </title><script>alert(document.cookie)</script><title> After the card is created XSS becomes persistent and can be triggered via https://ads.twitter.com/accounts/18ce53wrkma/cards/show?url_id=42qj.

Attachments

Capture_2014-09-09_06.10.10.png
Capture_2014-09-09_06.10.10.png From the original on HackerOne

The original report as published on HackerOne, by arbitrarycode. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the card name input was stored and later rendered without proper HTML encoding or sanitisation.

Impact

An attacker could execute arbitrary script in the context of the ads.twitter.com site, potentially stealing session cookies.

What the attacker needed

Access to ads.twitter.com; ability to create a card

How it was found

  1. Go to the new card page with card_type=7.
  2. Enter a script payload in the card name field.
  3. Create the card.
  4. Visit the card's show page to trigger the stored 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 report 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 people's browsers. Here, the card name field accepted a script tag, and the script ran whenever the card was viewed, which could let an attacker read a victim's login cookie.

What is XSS?

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

More from X / xAI

View all

The newest disclosed reports for this program.

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.