Pretty Photo Dom XSS
The jsDelivr CDN was serving PrettyPhoto 3.1.5, which is vulnerable to DOM-based XSS, even though fixed version 3.1.6 had been released upstream seven days earlier, leaving sites using it exposed.
- Disclosed after 6 days
Summary by the researcher
The issue was raised in order to draw attention to the fact
- New version with fixes was available on the official repository but still was not present in jsdeliver after multiple days, so if anyone wanted to use it they were stuck with older version.
- To Understand what can be done so that people don't use this vulnerable piece of code.
On one side i agree that the security issue is not with jsDelivr but on the other side jsDelivr becomes a tool for causing the issues. I agree with the finding that this is a non issue for jsDelivr as a site. Its just that the customers are impacted coz they are using vulnerable version of the javascript originating from your end.
However there are other concerns about the website functionality all together. On one side its claimed that the users should use newer version on the other side as the documented bug reports on github point to the fact that they rely soly on someone else to provide them the update. Is it not a due deligence requirement of the website to ensure new versions are made available. Even if a user wanted to use the new version it was not available on the website.
Besides this although new is what should be used is it not something like a no brainer to put a notice on website if someone selects an older version that this is vulnerable and not to used or just deprecated.
The aim of the issue was never to earn bounty but rather to have a conversation to identify what could be done.
The report
Hi Team,
Javascript for http://www.jsdelivr.com/#!prettyphoto hosted on the website points to 3.1.5 which is vulnerable to DOMXSS the upstream released an update 3.1.6 7 days back still the CDN is serving vulnerable edition effectively making all the websites vulnerable to DoMXSS
Details about the issue are outlined : http://blog.anantshri.info/forgotten_disclosure_dom_xss_prettyphoto
github issue for the stuff : https://github.com/scaron/prettyphoto/issues/149
Hope this helps.
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 CDN's update process did not automatically fetch the newly released fixed version of the library, leaving the vulnerable version available for inclusion.
Impact
Websites that included the vulnerable PrettyPhoto library from jsDelivr could be exposed to DOM-based cross-site scripting, allowing an attacker to run malicious JavaScript in visitors' browsers.
What the attacker needed
Victim visits a site using the vulnerable library; site loads PrettyPhoto from jsDelivr
The fix
The CDN should update the hosted library to the fixed version (3.1.6) and warn users when selecting older vulnerable versions.
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 content delivery network (CDN) like jsDelivr hosts copies of popular code libraries so websites can load them quickly. The CDN was still offering an old version of a library called PrettyPhoto that had a security flaw allowing an attacker to run their own code on any site using that library. The fixed version existed but had not been made available on the CDN, so sites remained exposed.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.