Prototype Pollution Akamai
A JavaScript function that parses URL query parameters into an object was vulnerable to prototype pollution because it did not validate keys. An attacker could exploit this to pollute the prototype and, by using a gadget in a third-party library, achieve cross-site scripting.
Published on github.com
History
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 the context of the vulnerable website, potentially leading to account compromise or data theft.
What the attacker needed
Victim uses Firefox; victim clicks a crafted link; vulnerable JavaScript library present
How it was found
- Identify the vulnerable function that parses URL parameters into an object.
- Attempt to exploit prototype pollution via the query string, but find it blocked by Akamai WAF.
- Discover that using a URL-encoded dot (%2e) in the path bypasses the WAF, but only in Firefox because Chrome normalises it.
- Confirm prototype pollution by checking the console for the polluted property.
- Find a gadget in a third-party library (Adobe DTM) that uses the polluted property to execute JavaScript.
- Trigger the gadget to achieve XSS.
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 or change properties on the base object that all other objects inherit from. This can break the application or, if another library uses the polluted property in a dangerous way, lead to cross-site scripting (XSS), where malicious code runs in the victim's browser.
What is Prototype pollution?
Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.