Prototype Pollution Masterclass: Practical Exploits, Detection &
The article describes prototype pollution vulnerabilities in client-side JavaScript and server-side Node.js applications, allowing attackers to modify object prototypes and potentially achieve DOM XSS, privilege escalation, or remote code execution. It walks through PortSwigger labs demonstrating detection and exploitation techniques.
async function searchLogger() { let config = {params: deparam(new URL(location).searchParams.toString()), transporturl: false}; Object.defineProperty(config, 'transporturl', {configurable: false, writable: false}); if(config.transporturl) { let script = document.createElement('script'); script.src =…
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 application merges user-controlled input into objects without properly blocking special properties like __proto__ or constructor.prototype, allowing modification of the object prototype.
Impact
An attacker could execute arbitrary JavaScript in the victim's browser, escalate privileges to admin, or run system commands on the server, depending on the context.
What the attacker needed
Victim visits a crafted URL; application uses vulnerable library or code
The fix
The article suggests using secure deserialization, prototype-safe parsing libraries, and server-side hardening, but does not state that a specific fix was applied.
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 where an attacker can add or change properties on a base object that many other objects inherit from. This can make the application behave unexpectedly, for example by running attacker-controlled JavaScript or granting extra privileges.
What is Prototype pollution?
Input changes JavaScript's shared object prototype, altering behaviour across the application, sometimes to XSS or code execution.