Server-side prototype pollution: Blackbox detection without the DoS
The text describes how server-side prototype pollution can be detected without causing denial of service, by using harmless properties that produce subtle response differences. An attacker could confirm the vulnerability and potentially chain it to other attacks, but the text focuses on detection rather than exploitation.
Published on portswigger.net
This research was presented live at NullCon Berlin 2023 and OWASP Global AppSec Dublin 2023:
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 a recursive merge operation on user-controlled JSON that does not sanitise keys such as __proto__, allowing modification of the global Object prototype.
Impact
Successful detection proves the attacker can modify global prototypes, which could lead to changed application behaviour or, in some cases, remote code execution, though the text notes that some techniques are destructive and can cause DoS.
What the attacker needed
A vulnerable JavaScript library that merges objects; ability to send JSON or query parameters; server running Node.js with Express or similar
The fix
The text suggests using Map/Set, deleting __proto__, or using null prototype objects to prevent prototype pollution, and notes that Express versions above 4.17.3 fixed the json spaces issue.
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 bug in JavaScript where an attacker can add or change properties on a shared object that many other objects inherit from. This can alter how the application behaves, and on a server it can break things for everyone until the process restarts. The article explains safer ways to test for this bug without crashing the server.
What is Prototype pollution?
Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.