Image: portswigger.net · rights & removal
Achieving the impossible: XSS in innerHTML without equals
Reporting by PortSwigger ResearchRead the original at portswigger.net
Executive Summary
A significant advancement in web security research involves solving an "impossible" injection challenge: executing arbitrary JavaScript within an `innerHTML` context when the equals sign is prohibited. This breakthrough was achieved by leveraging a newly introduced HTML element, initially inspired by a DOMPurify bypass discovered in May 2026. The mechanism relies on the specific DOM cloning behavior of the new element when it is created within an SVG namespace inside `innerHTML`.
The research detailed two key vectors. The first involved executing code without whitespace, "/", or "=", using the cloning capability inherent in the new element, which functions by copying child nodes of a selected element. The second, which solved the specific impossible lab, adapted this concept. Assigning the payload to `innerHTML` triggers execution because the cloning process, when occurring within the SVG namespace, causes the script to execute, a behavior seemingly distinct from standard HTML insertion.
However, this exploit vector relies on browser-specific implementations. While confirmed in Safari 27.2, the core functionality was subsequently patched in Chromium by setting the `already started` flag to true for SVG elements created via `innerHTML`, though it persists in the Safari version mentioned.
Facts Only
Masato Kinugawa was introduced as a guest web security researcher on the PortSwigger research channel.
A challenge named "innerHTML context but no equals allowed" had been considered impossible since 2020.
The discovery used a newly introduced HTML element.
A payload provided for the challenge was `document.body.innerHTML=\`alert(1)<\/script>\`;`.
This payload was confirmed to work in Safari 27.2 at the time of writing.
A DOMPurify bypass discovered by Kabir Acharya in May 2026 used this element.
The element clones child nodes of the currently selected element, copying content including HTML elements.
An initial vector executed JavaScript without whitespace, "/", or "=", utilizing the element's cloning.
This vector initially had limitations regarding content following the payload, which was addressed using SVG.
The final solution involved using the new HTML element within `innerHTML` to trigger execution within the SVG namespace.
Chromium subsequently changed behavior by setting the `already started` flag to true for SVG elements created via `innerHTML`.
Full Take
The core narrative presents a triumph of discovery against perceived technical limitation. The strongest version of this account is that meticulous investigation into browser internals—specifically DOM cloning mechanisms within SVG contexts—uncovered a previously theoretical vulnerability vector, allowing the researcher to bypass long-standing security assumptions regarding `innerHTML` execution restrictions. The credit is given to prior work on DOMPurify bypasses and the fundamental properties of element cloning.
A pattern emerges here related to the tension between theoretical specification and practical implementation. The initial security assumption—that content inserted via `innerHTML` is inert—was broken not by a flaw in the injection surface itself, but by a side effect of the underlying rendering engine's cloning algorithm interacting with namespace boundaries (SVG vs. HTML). This exemplifies how platform evolution, rather than simple coding errors, can create temporary, high-impact vulnerabilities. The dependence on the `already started` flag change in Chromium serves as a clear example of a remediation attempt that is itself an admission of fundamental implementation instability.
The pattern detected is ARC-0024 Ambiguity, specifically regarding the definition of "impossible." The article establishes an initial binary state—XSS is impossible here—only to dissolve it through technical minutiae, demonstrating that "impossible" in security is often context-dependent on the current state of the browser rendering engine. The implication is that security research is not about finding flaws, but about mapping the precise, volatile boundary conditions of implementation specifications. The cost is paid by the browser developers who must continually monitor and patch these esoteric behaviors, while the benefit accrues to those capable of operating at such a low level of abstraction.
Bridge Questions: If a specific browser patch (like the `already started` flag change) negates a technique, how rapidly do researchers need to pivot their focus to new, emergent browser features to maintain an edge against evolving platform defenses? How can vulnerability disclosure frameworks better account for implementation-specific, transient behaviors that defy general theoretical models?
Patterns detected: ARC-0024 Ambiguity
From the original · PortSwigger Research
Published: Wednesday, 18 November 2026 at 14:39 UTC Updated: Wednesday, 18 November 2026 at 14:39 UTC I'm delighted to introduce Masato Kinugawa as a guest web security researcher on the PortSwigger research channel. Masato is a well known web security expert who has found countless high impact bugs and amazingly he solved one of our "impossible" labs.Read the full story at portswigger.net
Sentinel unavailable
The automated check of the source article's wording did not complete, so no result is shown.
This looks only at the wording of the original source article, not at this page's AI-written sections. A small local AI model made this estimate. It has not been checked against known human and machine texts, so treat it as provisional. It cannot show who wrote an article.
