Skip to content
Prototype pollution Write-up Intermediate

Exploring jQuery Prototype Pollution (CVE-2019–11358) and Its Potential XSS Impact

The website used an outdated jQuery version vulnerable to prototype pollution via deep-merge. The author demonstrated the pollution in the browser console but did not find an attacker-controlled entry point or a working gadget to exploit it on the live site.

Josh Rai Follow

Published on medium.com

I’m a cybersecurity student at a local university. Recently, I noticed a few issues with my university’s web portal, which made me curious about the websites of other local universities.

Josh Rai, on medium.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

Root cause

Likely the deep-merge function in jQuery 1.11.1 did not properly block special properties like __proto__, allowing prototype pollution.

Impact

The prototype pollution could potentially lead to client-side privilege manipulation, DOM-based XSS, or client-side denial of service, but the author did not confirm an exploitable entry point or gadget on the live website.

What the attacker needed

Victim uses vulnerable jQuery version; attacker-controlled input reaches deep-merge; suitable gadget exists

The fix

The issue was fixed in jQuery 3.4.0, and the author verified that the proof of concept no longer worked with jQuery 3.6.0.

How it was found

  1. Check the website's jQuery version using Wappalyzer.
  2. Run a prototype pollution proof of concept in the browser console.
  3. Observe that a new empty object inherits the polluted property.
  4. Clean up by deleting the test property.

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.

Prototype pollution is a JavaScript bug where an attacker can add properties to a shared object that many other objects inherit from. This can change how the application behaves, for example by making a user appear as an administrator. The author found an old jQuery library that allowed this, but could not find a way for an attacker to trigger it on the real website.

What is Prototype pollution?

Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.

Similar reports

View all

Same bug class and techniques, clearest first.

Prototype pollution

The lesson behind this report.

Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.