Novel XSS Technique BypassesinnerHTML Filters Without Equals Sign
Web security researcher Masato Kinugawa has demonstrated a new method for achieving Cross-Site Scripting (XSS) vulnerabilities in the innerHTML property without using the equals sign, bypassing traditional filters.

Web security researcher Masato Kinugawa has unveiled a novel technique that allows for Cross-Site Scripting (XSS) vulnerabilities within the innerHTML property of web applications, crucially without requiring the use of the equals sign (=). This bypasses common security filters designed to detect and block traditional XSS payloads that rely on attribute assignments.
The research, presented by Kinugawa on PortSwigger Research, addresses a long-standing challenge known as the "innerHTML context but no equals allowed" lab. This challenge was considered by many to be an impossible scenario for achieving arbitrary JavaScript execution. Kinugawa's breakthrough utilizes a recently introduced HTML element, <selectedcontent>, to achieve this feat.
The core of the technique involves a specific payload structure within a <select> element. By embedding a <script> tag within an <option> element that is then cloned into the <selectedcontent> element, the browser's rendering engine executes the script. This behavior is specific to how certain browsers, including Safari and recent versions of Chrome, handle the cloning of DOM nodes within <selectedcontent>.
Initially, a payload like <select><button><selectedcontent></selectedcontent></button><option><script>alert(1)</script> was found to work. However, further refinement, in collaboration with Mathias Karlsson, led to a more robust version that eliminated the need for whitespace and forward slashes (/). This advanced payload, <select><button><selectedcontent><button><option><script>alert(1)</script>, demonstrated the ability to execute JavaScript with a significantly reduced character set.
A critical limitation of earlier versions was their susceptibility to syntax errors if any content followed the payload. To overcome this, Kinugawa incorporated SVG <script> elements. Unlike standard HTML <script> tags, SVG <script> elements allow the HTML parser to correctly interpret subsequent HTML tags, preventing them from being parsed as part of the JavaScript code. This makes the exploit viable even when legitimate page content follows the injected payload.
While the technique has been noted to no longer function in Chrome version 153 due to a behavior change, it has been confirmed to work in Safari version 27.2. This discovery highlights the ongoing evolution of XSS attack vectors and the need for developers to stay abreast of new HTML features and their potential security implications.
The implications of this research are significant for web application security. Developers relying on simple string-based filtering for the equals sign to prevent innerHTML XSS are now vulnerable to this new class of attacks. It underscores the importance of using robust, context-aware sanitization libraries and keeping them updated to mitigate emerging threats.