[api.tumblr.com] Exploiting clickjacking vulnerability to trigger self DOM-based XSS
The API console page rendered user-supplied text into the DOM using an HTML-building call, so a crafted value containing an image tag with an error handler executed script in the page's own context. Because the console page could also be framed, an attacker could use clickjacking to make a logged-in victim trigger the script.
- Triaged in 25 days
- Fixed in 33 days
- Paid in 33 days
- Disclosed after 2 months
Hello i have found a clickjacking vulnerability in https://api.tumblr.com/console/* And a self DOM-based XSS In https://api.tumblr.com/console/calls/user/(follow/unfollow)
A attacker can exploit the clickjacking to trigged the self DOM-based XSS
Vulnerable URL to clickjacking : https://api.tumblr.com/console/*
Vulnerable URL to self DOM-based XSS :
https://api.tumblr.com/console/calls/user/unfollow https://api.tumblr.com/console/calls/user/follow
Vulnerable code to self DOM-based XSS : https://assets.tumblr.com/assets/scripts/console/console.js line 1309
var e = jQuery(this);
if (0 === e.text().indexOf('"http://') || 0 === e.text().indexOf('"https://')) {
var t = e.text().slice(1, - 1),
n = jQuery('<a target="_blank">').text(e.text()).attr('href', t);
n.html('"<u>' + t + '</u>"'),
/\.(gif|jpg|jpeg|tiff|png)$/i.test(t) && n.addClass('image-modal'),
e.html(n)
}
line 1309 : n.html('"<u>' + t + '</u>"')
this trigger a self DOM-based XSS
With this payload :
https://www.<img src=x onerror='alert()'>
Steps To Reproduce:
- Log in https://api.tumblr.com/console/calls/user/info
- Open the poc.html with chrome, and follow the instruction into the clickjacking page (Note: i have only test the poc.html with chrome)
/!\ Note this vulnerability needs a lot of user interaction, this why i have passed this report to low /!\
I hope the poc.html work this your navigator.
Thanks bye.
Impact
A attacker can manipulate a victim to click and follow instruction in the clickjacking page to triaged the self DOM-based XSS
Attachments

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 console script built an anchor element by concatenating untrusted text into an HTML string and assigning it with .html(), so markup in the text was parsed and executed instead of being shown as plain text.
Impact
An attacker could manipulate a victim into clicking through a framed page to trigger the DOM-based script, though the report notes it needs a lot of user interaction and was only tested in Chrome.
What the attacker needed
Victim is logged in; victim opens attacker page; victim follows clickjacking instructions; Chrome only, per the reporter
How it was found
- Log in to the API console user info page.
- Open the attacker's proof-of-concept page in Chrome and follow the instructions on the clickjacking page.
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.
A DOM-based cross-site scripting flaw means the page takes some text and inserts it into the page as HTML, so any markup in that text runs as code. Clickjacking means the attacker loads the real site inside an invisible frame and tricks the victim into clicking things they cannot see. Together, the attacker could get a logged-in user to run the attacker's script on the site's own domain.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.