Skip to content
Prototype pollution Write-up Advanced

"A tale of making internet pollution free" - Exploiting Client-Side Prototype Pollution in the wild

The author hunted for client-side prototype pollution in a large bug bounty programme by statically scanning JavaScript files with CodeQL, looking for vulnerable merge calls and location parsers. The text describes the methodology and tooling but does not state a confirmed vulnerability, payload or impact.

Sergey Bobrov Follow

Published on blog.s1r1us.ninja

Bounty$12,600total stated by author View original

This is one of my favorite bugs, One evening I am working on my favorite bug bounty program, I was trying to find the pollution using the addon and the selenium bot. But neither of them showed any interesting results.

Sergey Bobrov (@black2fan), s1r1us (@s1r1u5_), Terjanq (@terjanq), Beomjin Lee (@po6ix), Masato Kinugawa (@kinugawamasato), Nikita Stupin (@_nikitastupin), Rahul Maini (@iamnoooob), on blog.s1r1us.ninja

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 unsafe merging of user-controlled input into object properties, or parsing of the URL location into objects, without filtering dangerous keys such as prototype-related ones.

Impact

The text does not confirm any exploited impact; it only describes the search for potentially vulnerable code patterns.

What the attacker needed

Large JS-heavy scope; ability to download JS files; CodeQL tooling

How it was found

  1. Passively scan the in-scope applications and download their JavaScript files into a folder.
  2. Create a CodeQL database from the collected JavaScript.
  3. Write or adapt a CodeQL query using remote flow sources or the URL location as source and insecure property assignment as sink.
  4. Run the queries against the database to look for vulnerable merge calls or location parsers.

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 flaw where an attacker can sneak extra properties into a shared base object that many other objects inherit from, which can change how the application behaves. This write-up is mostly about the author's search method: they downloaded the site's JavaScript and used a code analysis tool to look for risky patterns, rather than describing a finished exploit.

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.