Prototype Pollution
Prototype Pollution
Example 1: JavaScript
Vulnerable Code:
Reason for vulnerability: If req.body.user
contains __proto__
, it can pollute the object prototype.
Fixed Code:
Reason for fix: Check for the presence of __proto__
and prevent prototype pollution.
Example 2: JavaScript
Vulnerable Code:
Reason for vulnerability: If req.body
contains __proto__
, it can pollute the object prototype.
Fixed Code:
Reason for fix: Check for the presence of __proto__
and prevent prototype pollution.
Last updated