Cyber Risks · PortSwigger Research

Lab: Exfiltrating sensitive data via server-side prototype pollution

Summary: PortSwigger's lab runs on Node.js and the Express framework and is vulnerable to server-side prototype pollution because it unsafely merges user-controllable input into a server-side JavaScript object, allowing Object.prototype to be polluted so that arbitrary system commands execute on the server. The walkthrough injects a __proto__ property with a json spaces value to confirm the pollution through increased JSON indentation, then uses malicious properties controlling options passed to child_process.execSync() to trigger Burp Collaborator interactions and exfiltrate the contents of /home/carlos/secret.

Bottom line: The path from a single JSON property on an address-change form to remote code execution runs through a maintenance button that spawns node child processes, so the same merge flaw that looks like a formatting quirk in a response can hand an attacker command execution and the contents of a home directory.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related