Cyber Risks · PortSwigger Research

Lab: DOM XSS via an alternative prototype pollution vector

Summary: PortSwigger's lab demonstrates DOM XSS through client-side prototype pollution: an alternative pollution vector in the query string adds a foo property to Object.prototype, and a gadget in searchLoggerAlternative.js passes the manager.sequence property to an eval() sink. The payload initially fails because a numeric 1 character is appended to it, producing invalid JavaScript syntax, and adding a trailing minus character to the payload makes alert(1) execute.

Bottom line: The exploit needs no server-side flaw: a query-string property that reaches Object.prototype combines with an eval() sink to run arbitrary JavaScript, and the fix hinged on a single appended character that broke the syntax.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related