TL;DR
The traditional "reflected vs. stored" matrix for Cross-Site Scripting (XSS) is no longer sufficient for the modern web. This paper introduces MatriXSSed, a new taxonomy that accounts for complex features like Service Workers, Edge computing, and WebAssembly, treating persistence as a continuum rather than a binary toggle.
What Problem Does This Paper Address?
For over two decades, the security community has categorized XSS using a simple 2x2 matrix: Is it client-side or server-side? Is it reflected (temporary) or stored (persistent)?
However, the web architecture has evolved into a multi-layered ecosystem. We now have Service Workers acting as programmable proxies in the browser, Edge Workers running serverless code at the CDN level, and WebAssembly (Wasm) providing a completely new execution environment alongside JavaScript. These technologies create "gray areas" that the old taxonomy can't describe. For instance, if a payload is reflected by an Edge Worker but then cached by a Service Worker, is it reflected or stored? The authors argue that our current mental models are imprecise, making it harder to defend against sophisticated, modern injection attacks.
Methods
The authors move away from rigid boxes and propose a descriptive framework based on two phases:
- Infection (The Delivery): How the malicious code gets into the system.
- Affection (The Execution): How and where the code actually runs.
To build this, they analyze the "precedence" and "persistence" of modern web components. They specifically investigate:
- Context Isolation: How Workers and Worklets execute in threads separate from the main UI.
- Storage Hierarchies: Comparing the lifespan of data in
sessionStorageversus the newer, more permanent File System Access (FSA) API. - The "Service-Worker-Allowed" (SWA) Header: They perform a security analysis of this header to see how it can be abused to expand an attacker's scope.
Datasets
This is a theoretical and architectural paper rather than a large-scale empirical study. Instead of a traditional dataset, the authors use a comparative mapping (Figure 5 in the paper) where they take known high-profile XSS research from the last decade (e.g., studies on DOM-based XSS and Service Worker security) and "re-map" them into their new taxonomy to prove its expressiveness.
Key Insights and Ideas
- Persistence is a Continuum: Instead of "persistent vs. non-persistent," the authors suggest a spectrum. A payload in the File System Access API is "more persistent" than one in
localStoragebecause it can survive browser uninstalls and OS updates. - The Proxy Power of Service Workers: Service Workers can intercept all network requests for an origin. The authors highlight "Cache Collision" attacks, where a Service Worker can be tricked into serving a reflected XSS payload to every single user of a site, effectively turning a "one-off" attack into a global, persistent infection.
- WebAssembly as a Dark Corner: While most XSS research focuses on JavaScript, Wasm is a compiled execution environment that can also be a sink for malicious code, yet it is often overlooked by current security scanners and Content Security Policies (CSP).
- The SWA Header Exploit: The most striking "aha moment" is the demonstration of how an attacker with limited access to a subdirectory (like
example.com/~attacker/) can use a server-side script to set theService-Worker-Allowed: /header. This allows their malicious Service Worker to seize control of the entire domain, including other users' private directories.
Key Results
- A New Taxonomy: The paper successfully maps 12 distinct modern attack scenarios that the old OWASP matrix struggled to categorize.
- Domain Takeover Proof-of-Concept: The authors successfully mounted the SWA header attack in controlled environments across multiple Linux distributions (Debian, Ubuntu, Fedora) using standard Apache/PHP setups.
- Defense Gap Analysis: They reveal that Content Security Policy (CSP) is significantly less effective in Worker contexts. For example, many CSP directives (like nonces or hashes) are not supported in Workers, and the
script-srcdirective behaves differently, leaving a gap for attackers to exploit.
Limitations and Future Work
The authors acknowledge that while their taxonomy is more flexible, the web continues to change. Specifically:
- Wasm Vulnerabilities: There is currently very little prior work or real-world data on XSS specifically targeting WebAssembly sinks; this remains a theoretical but high-risk area.
- Automated Tooling: The paper provides the framework, but it does not provide an automated scanner to detect these "MatriXSSed" attacks. Developing tools that can trace data flows across Service Workers and Edge Workers is a suggested next step.
- Browser Implementation: Some features, like the File System Access API, are currently only supported in Chromium-based browsers, meaning the "permanent" persistence threats are currently platform-specific.
Summary updated