Skip to content
XSS Write-up Intermediate

gif it time it’ll come to you - Finding More Holes in The Hub

The GIF generator allowed an attacker to inject a malicious title containing a data URI and a meta refresh directive, which was then placed into a twitter:meta tag on the GIF's page. When a victim visited the GIF, their browser was redirected to the data URI, executing arbitrary JavaScript.

Andy Gill Follow

Published on blog.zsec.uk

Following suit of stored cross site scripting vulnerabilities this post will talk about another issue I found in Pornhub. Unfortunately someone found before me and as a result this bug was a duplicate.

Andy Gill (@ZephrFish), on blog.zsec.uk

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 application failed to sanitise user-supplied GIF titles before embedding them into a meta tag, allowing injection of a meta refresh directive that redirected to a data URI.

Impact

An attacker could execute arbitrary JavaScript in a victim's browser when they visited a malicious GIF, potentially leading to account compromise or other actions.

What the attacker needed

Ability to create a GIF; victim visits the GIF page

The fix

The issue was fixed by sanitising user input before embedding it into meta tags.

How it was found

  1. Insert a random video into the create gif tool.
  2. Trap the request in a proxy and turn on intercept.
  3. Modify the title content with a malicious payload.
  4. Forward the request to the server to save the image title.
  5. Visit the GIF to trigger the redirect and JavaScript 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.

A website let users create animated GIFs and give them a title. The site put that title into a hidden part of the page that tells social media how to preview the link. By putting special instructions in the title, an attacker could make the victim's browser run harmful code when they viewed the GIF.

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 Andy Gill

View all

4 more disclosed reports, best first.

More from PornHub

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.