Lune

NDSS2019Top-tier venue

Don't Trust The Locals: Investigating the Prevalence of Persistent Client-Side Cross-Site Scripting in the Wild

Marius Steffens, Christian Rossow, Martin Johns, Ben Stock

Abstract

The Web has become highly interactive and an important driver for modern life, enabling information retrieval, social exchange, and online shopping. From the security perspective, Cross-Site Scripting (XSS) is one of the most nefarious attacks against Web clients. Research has long since focused on three categories of XSS: Reflected, Persistent, and DOMbased XSS. In this paper, we argue that our community must consider at least four important classes of XSS, and present the first systematic study of the threat of Persistent Client-Side XSS, caused by the insecure use of client-side storage. While the existence of this class has been acknowledged, especially by the non-academic community like OWASP, prior works have either only found such flaws as side effects of other analyses or focused on a limited set of applications to analyze. Therefore, the community lacks in-depth knowledge about the actual prevalence of Persistent Client-Side XSS in the wild. To close this research gap, we leverage taint tracking to identify suspicious flows from client-side persistent storage (Web Storage, cookies) to dangerous sinks (HTML, JavaScript, and script.src). We discuss two attacker models capable of injecting malicious payloads into storage, i.e., a Network Attacker capable of temporarily hijacking HTTP communication (e.g., in a public WiFi), and a Web Attacker who can leverage flows into storage or an existing reflected XSS flaw to persist their payload. With our taint-aware browser and these models in mind, we study the prevalence of Persistent Client-Side XSS in the Alexa Top 5,000 domains. We find that more than 8% of them have unfiltered data flows from persistent storage to a dangerous sink, which showcases the developers’ inherent trust in the integrity of storage content. Even worse, if we only consider sites that make use of data originating from storage, 21% of the sites are vulnerable. For those sites with vulnerable flows from storage to sink, we find that at least 70% are directly exploitable by our attacker models. Finally, investigating the vulnerable flows originating from storage allows us to categorize them into four disjoint categories and propose appropriate mitigations.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

32 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • JAW: Studying Client-side CSRF with Hybrid Property Graphs and Declarative Traversals cites Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
  • JAW: Studying Client-side CSRF with Hybrid Property Graphs and Declarative Traversals cites The Cracked Cookie Jar: HTTP Cookie Hijacking and the Exposure of Private Information
  • PMForce: Systematically Analyzing postMessage Handlers at Scale cites The Cracked Cookie Jar: HTTP Cookie Hijacking and the Exposure of Private Information
  • The Cookie Hunter: Automated Black-box Auditing for Web Authentication and Authorization Flaws cites You've Got Vulnerability: Exploring Effective Vulnerability Notifications
  • The Cookie Hunter: Automated Black-box Auditing for Web Authentication and Authorization Flaws cites CSP Is Dead, Long Live CSP! On the Insecurity of Whitelists and the Future of Content Security Policy
  • The Cookie Hunter: Automated Black-box Auditing for Web Authentication and Authorization Flaws cites The Cracked Cookie Jar: HTTP Cookie Hijacking and the Exposure of Private Information
  • The Cookie Hunter: Automated Black-box Auditing for Web Authentication and Authorization Flaws cites Hey, You Have a Problem: On the Feasibility of Large-Scale Web Vulnerability Notification
  • Hey, You Have a Problem: On the Feasibility of Large-Scale Web Vulnerability Notification cites You've Got Vulnerability: Exploring Effective Vulnerability Notifications
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers32

  1. The Cookie Hunter: Automated Black-box Auditing for Web Authentication and Authorization FlawsKostas Drakonakis, Sotiris Ioannidis, Jason PolakisCCS 2020 · 56 citations
  2. JAW: Studying Client-side CSRF with Hybrid Property Graphs and Declarative TraversalsSoheil Khodayari, Giancarlo PellegrinoUSENIX Security 2021 · 51 citations
  3. Abusing Hidden Properties to Attack the Node.js EcosystemFeng Xiao, Jianwei Huang, Yichang Xiong, Guangliang Yang et al.USENIX Security 2021 · 35 citations
  4. Security Certification in Payment Card Industry: Testbeds, Measurements, and RecommendationsSazzadur Rahaman, Gang Wang, Danfeng Daphne YaoCCS 2019 · 31 citations
  5. PMForce: Systematically Analyzing postMessage Handlers at ScaleMarius Steffens, Ben StockCCS 2020 · 23 citations

Builds on10

  1. Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the WebTobias Lauinger, Abdelberi Chaabane, Sajjad Arshad, William Robertson et al.NDSS 2017 · 183 citations
  2. You've Got Vulnerability: Exploring Effective Vulnerability NotificationsFrank Li, Zakir Durumeric, Jakub Czyz, Mohammad Karami et al.USENIX Security 2016 · 149 citations
  3. Hey, You Have a Problem: On the Feasibility of Large-Scale Web Vulnerability NotificationBen Stock, Giancarlo Pellegrino, Christian Rossow, Martin Johns et al.USENIX Security 2016 · 130 citations
  4. CSP Is Dead, Long Live CSP! On the Insecurity of Whitelists and the Future of Content Security PolicyLukas Weichselbaum, Michele Spagnuolo, Sebastian Lekies, Artur JancCCS 2016 · 114 citations
  5. The Cracked Cookie Jar: HTTP Cookie Hijacking and the Exposure of Private InformationSuphannee Sivakorn, Iasonas Polakis, Angelos D. KeromytisS&P 2016 · 86 citations

Related papers

  1. Riding out DOMsday: Towards Detecting and Preventing DOM Cross-Site ScriptingWilliam Melicher, Anupam Das, Mahmood Sharif, Lujo Bauer et al.NDSS 2018 · 84 citations
  2. MatriXSSed: A New Taxonomy for XSS in the Modern WebDolière Francis SoméWWW 2025 · 2 citations
  3. Towards a Lightweight, Hybrid Approach for Detecting DOM XSS Vulnerabilities with Machine LearningWilliam Melicher, Clement Fung, Lujo Bauer, Limin JiaWWW 2021 · 34 citations
  4. Splendor: Static Detection of Stored XSS in Modern Web ApplicationsHe Su, Feng Li, Lili Xu, Wenbo Hu et al.ISSTA 2023 · 11 citations
  5. Code-Reuse Attacks for the Web: Breaking Cross-Site Scripting Mitigations via Script GadgetsSebastian Lekies, Krzysztof Kotowicz, Samuel Groß, Eduardo A. Vela Nava et al.CCS 2017 · 62 citations
Dusk over the sea between two cliffs drawn in fine vertical lines