JSON hijacking for the modern web
Summary: PortSwigger researcher Gareth Heyes documented cross-domain data theft using JavaScript proxies to overwrite the __proto__ chain and capture undefined variables, working on Edge via Object.setPrototypeOf and on Chrome 53 five levels deep into the prototype chain. He also showed that the UTF-16BE charset attribute on script tags lets attackers turn JSON feeds and HTML documents into valid JavaScript variables, enabling data theft and bypassing CSP policies that allow same-domain scripts, with the Chrome issue fixed in version 54 and PHP later defaulting to UTF-8 for text/html.
Why it matters: The attack needs no control over most of the response in Chrome, and a CSP that permits same-domain scripts was bypassed by treating an HTML document as a JavaScript variable, so a policy most organizations rely on did not stop the data theft.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026