Cyber Risks · PortSwigger Research

What is prototype pollution?

Summary: Prototype pollution is a JavaScript vulnerability that lets an attacker add arbitrary properties to global object prototypes, which are then inherited by user-defined objects. It typically arises when a function recursively merges an object containing user-controllable properties into an existing object without sanitizing keys, allowing injection of a __proto__ key whose nested properties get assigned to the prototype instead of the target object.

Bottom line: Prototype pollution is often unexploitable on its own, but it gives an attacker control over properties developers assume are not user-controllable - and when chained with a sink and gadget, client-side cases commonly lead to DOM XSS while server-side cases can result in remote code execution.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related