Prototype pollution via JSON.parse
This lab demonstrates prototype pollution vulnerabilities that occur when using JSON.parse() to process untrusted JSON data. Attackers can inject malicious prototype properties through JSON input.
Objective: Understand how JSON-based prototype pollution attacks work and how to exploit them.
This application processes JSON configuration data from API requests. Try to exploit prototype pollution vulnerabilities:
This lab demonstrates JSON-based prototype pollution vulnerabilities:
JSON.parse() - Unsafe JSON parsing__proto__ - Direct prototype accessconstructor - Constructor property accessNo validation - Missing input validationThese JSON properties can be exploited for prototype pollution:
__proto__ - Direct prototype accessconstructor - Constructor property accessprototype - Prototype property accessconstructor.prototype - Nested prototype accessThis demonstrates how JSON.parse() can lead to prototype pollution:
Use these techniques to exploit JSON-based prototype pollution vulnerabilities: