Lune

ICSE2020Top-tier venue

Extracting taint specifications for JavaScript libraries

Cristian-Alexandru Staicu, Martin Toldam Torp, Max Schäfer, Anders Møller, Michael Pradel

Abstract

Modern JavaScript applications extensively depend on third-party libraries. Especially for the Node.js platform, vulnerabilities can have severe consequences to the security of applications, resulting in, e.g., cross-site scripting and command injection attacks. Existing static analysis tools that have been developed to automatically detect such issues are either too coarse-grained, looking only at package dependency structure while ignoring dataflow, or rely on manually written taint specifications for the most popular libraries to ensure analysis scalability. In this work, we propose a technique for automatically extracting taint specifications for JavaScript libraries, based on a dynamic analysis that leverages the existing test suites of the libraries and their available clients in the npm repository. Due to the dynamic nature of JavaScript, mapping observations from dynamic analysis to taint specifications that fit into a static analysis is non-trivial. Our main insight is that this challenge can be addressed by a combination of an access path mechanism that identifies entry and exit points, and the use of membranes around the libraries of interest. We show that our approach is effective at inferring useful taint specifications at scale. Our prototype tool automatically extracts 146 additional taint sinks and 7 840 propagation summaries spanning 1 393 npm modules. By integrating the extracted specifications into a commercial, state-of-the-art static analysis, 136 new alerts are produced, many of which correspond to likely security vulnerabilities. Moreover, many important specifications that were originally manually written are among the ones that our tool can now extract automatically.

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.

17 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

  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript cites SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript cites BreakApp: Automated, Flexible Application Compartmentalization
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript cites Preventing Dynamic Library Compromise on Node.js via RWX-Based Privilege Reduction
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript cites Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript cites Modular call graph construction for security scanning of Node.js applications
  • SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS cites Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
  • BreakApp: Automated, Flexible Application Compartmentalization cites Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
  • Preventing Dynamic Library Compromise on Node.js via RWX-Based Privilege Reduction cites SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
  • Preventing Dynamic Library Compromise on Node.js via RWX-Based Privilege Reduction cites BreakApp: Automated, Flexible Application Compartmentalization
  • Preventing Dynamic Library Compromise on Node.js via RWX-Based Privilege Reduction cites Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
  • Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers cites Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
  • Small World with High Risks: A Study of Security Threats in the npm Ecosystem cites SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
  • Small World with High Risks: A Study of Security Threats in the npm Ecosystem cites BreakApp: Automated, Flexible Application Compartmentalization
  • Small World with High Risks: A Study of Security Threats in the npm Ecosystem cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Small World with High Risks: A Study of Security Threats in the npm Ecosystem cites Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
  • Modular call graph construction for security scanning of Node.js applications cites SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
  • Modular call graph construction for security scanning of Node.js applications cites Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • Modular call graph construction for security scanning of Node.js applications cites Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web
  • Efficient Static Vulnerability Analysis for JavaScript with Multiversion Dependency Graphs cites SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript
  • Efficient Static Vulnerability Analysis for JavaScript with Multiversion Dependency Graphs cites SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
  • Efficient Static Vulnerability Analysis for JavaScript with Multiversion Dependency Graphs cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Efficient Static Vulnerability Analysis for JavaScript with Multiversion Dependency Graphs cites Small World with High Risks: A Study of Security Threats in the npm Ecosystem
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers17

  1. Modular call graph construction for security scanning of Node.js applicationsBenjamin Barslev Nielsen, Martin Toldam Torp, Anders MøllerISSTA 2021 · 47 citations
  2. Preventing Dynamic Library Compromise on Node.js via RWX-Based Privilege ReductionNikos Vasilakis, Cristian-Alexandru Staicu, Grigoris Ntousakis, Konstantinos Kallas et al.CCS 2021 · 27 citations
  3. SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScriptMasudul Hasan Masud Bhuiyan, Adithya Srinivas Parthasarathy, Nikos Vasilakis, Michael Pradel et al.ICSE 2023 · 20 citations
  4. ÐArcher: detecting on-chain-off-chain synchronization bugs in decentralized applicationsWuqi Zhang, Lili Wei, Shuqing Li, Yepang Liu et al.FSE 2021 · 19 citations
  5. Efficient Static Vulnerability Analysis for JavaScript with Multiversion Dependency GraphsMafalda Ferreira, Miguel Monteiro, Tiago Brito, Miguel E. Coimbra et al.PLDI 2024 · 13 citations

Builds on7

  1. Small World with High Risks: A Study of Security Threats in the npm EcosystemMarkus Zimmermann, Cristian-Alexandru Staicu, Cam Tenny, Michael PradelUSENIX Security 2019 · 281 citations
  2. 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
  3. Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web ServersCristian-Alexandru Staicu, Michael PradelUSENIX Security 2018 · 125 citations
  4. SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JSCristian-Alexandru Staicu, Michael Pradel, Benjamin LivshitsNDSS 2018 · 91 citations
  5. BreakApp: Automated, Flexible Application CompartmentalizationNikos Vasilakis, Ben Karel, Nick Roessler, Nathan Dautenhahn et al.NDSS 2018 · 66 citations

Related papers

  1. Scaling JavaScript Abstract Interpretation to Detect and Exploit Node.js Taint-style VulnerabilityMingqing Kang, Yichao Xu, Song Li, Rigel Gjomemo et al.S&P 2023
  2. Riding out DOMsday: Towards Detecting and Preventing DOM Cross-Site ScriptingWilliam Melicher, Anupam Das, Mahmood Sharif, Lujo Bauer et al.NDSS 2018 · 84 citations
  3. NodeMedic-FINE: Automatic Detection and Exploit Synthesis for Node.js VulnerabilitiesDarion Cassel, Nuno Sabino, Min-Chien Hsu, Ruben Martins et al.NDSS 2025
  4. Automated Exploit Generation for Node.js PackagesFilipe Marques, Mafalda Ferreira, André Nascimento, Miguel E. Coimbra et al.PLDI 2025 · 5 citations
  5. Reducing Static Analysis Unsoundness with Approximate InterpretationMathias Rud Laursen, Wenyuan Xu, Anders MøllerPLDI 2024 · 5 citations
Dusk over the sea between two cliffs drawn in fine vertical lines