Cyber Risks · PortSwigger Research

Lab: Privilege escalation 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. After logging in as wiener:peter and submitting the address form, the POST /my-account/change-address request sends JSON that the server echoes back, and injecting a __proto__ object with an isAdmin property changes the isAdmin value in the response, giving access to the admin panel.

Key Takeaway: A single injected __proto__ property in a JSON body flipped isAdmin from false to true and opened the admin panel, so any endpoint that merges request data into an object without guarding the prototype chain is a privilege escalation path.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related