Skip to content
Prototype pollution Write-up Advanced

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.

Sudhanshu Rajbhar Follow

Published on github.com

History

Sudhanshu Rajbhar (@sudhanshur705), on github.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 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

  1. Identify the vulnerable function that parses URL parameters into an object.
  2. Attempt to exploit prototype pollution via the query string, but find it blocked by Akamai WAF.
  3. Discover that using a URL-encoded dot (%2e) in the path bypasses the WAF, but only in Firefox because Chrome normalises it.
  4. Confirm prototype pollution by checking the console for the polluted property.
  5. Find a gadget in a third-party library (Adobe DTM) that uses the polluted property to execute JavaScript.
  6. 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.

More by Sudhanshu Rajbhar

View all

12 more disclosed reports, best first.

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.