Skip to content
XSS Write-up Beginner

Discovering a stored XSS that affects over 900k websites (CVE-2016-9751)

A stored cross-site scripting vulnerability existed in Piwigo's quick search feature when using the 'elegant' theme, where search keywords were not sanitised on the search criteria page. An attacker could inject a payload that would execute when a victim visited a crafted URL, and the payload remained stored even after the fix.

jonbottarini.com

Published on jonbottarini.com

In my free time when I’m not hunting for bugs in paid programs, I like to contribute a bit to the open-source community and check for vulnerabilities that might arise. In doing so, I found a stored cross-site scripting vulnerability that affected over 900,000 websites… yikes.

Jon Bottarini, on jonbottarini.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 execute arbitrary JavaScript in a victim's browser when they visit a crafted search URL, and the stored payload could persist even after a patch unless the search history was purged.

What the attacker needed

Piwigo instance with 'elegant' theme; victim clicks a crafted link

The fix

The vulnerability was fixed in Piwigo 2.9, and webmasters should update to that version.

How it was found

  1. Select the 'elegant' theme in Piwigo.
  2. Enter a malicious payload in the quick search area.
  3. Open the 'search criteria' page to trigger the stored payload.

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.

Cross-site scripting (XSS) is a bug where a website shows user input without cleaning it, so an attacker can sneak in code that runs in other people's browsers. Here, the search terms were saved and later displayed without cleaning, so a malicious search could run code when someone opened a link to it.

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.