Prototype Pollution
A JavaScript vulnerability where attackers modify Object.prototype, affecting all objects in the application and potentially enabling property injection or code execution.
Prototype Pollution is a JavaScript vulnerability where attackers can modify the prototype of base objects (like Object.prototype), affecting all objects in the application. This can lead to denial of service, property injection, or in some cases, remote code execution.
How It Works
JavaScript objects inherit properties from their prototype chain. If an attacker can set properties on Object.prototype, those properties become accessible on all objects, potentially overwriting expected values or injecting malicious ones.
Impact Examples
- Bypass security checks that rely on property existence
- Inject properties used in template rendering (XSS)
- Modify application configuration
- RCE in Node.js via child_process options pollution