Unveiling the Invisible: Detection and Evaluation of Prototype Pollution Gadgets with Dynamic Taint Analysis
Mikhail Shcherbakov, Paul Moosbrugger, Musard Balliu
Abstract
For better or worse, JavaScript is the cornerstone of modern Web. Prototype-based languages like JavaScript are susceptible to prototype pollution vulnerabilities, enabling an attacker to inject arbitrary properties into an object's prototype. The attacker can subsequently capitalize on the injected properties by executing otherwise benign pieces of code, so-called gadgets, that perform security-sensitive operations. The success of an attack largely depends on the presence of gadgets, leading to high-profile exploits such as privilege escalation and arbitrary code execution (ACE). This paper proposes Dasty, the first semi-automated pipeline to help developers identify gadgets in their applications' software supply chain. Dasty targets server-side Node.js applications and relies on an enhancement of dynamic taint analysis which we implement with the dynamic AST-level instrumentation. Moreover, Dasty provides support for visualization of code flows with an IDE, thus facilitating the subsequent manual analysis for building proof-of-concept exploits. To illustrate the danger of gadgets, we use Dasty in a study of the most dependent-upon NPM packages to analyze the presence of gadgets leading to ACE. Dasty identifies 1,269 server-side packages, of which 631 have code flows that may reach dangerous sinks. We manually prioritize and verify the candidate flows to build proof-of-concept exploits for 49 NPM packages, including popular packages such as ejs, nodemailer and workerpool. To investigate how Dasty integrates with existing tools to find endto-end exploits, we conduct an in-depth analysis of a popular data visualization dashboard to find one high-severity CVE-2023-31415 leading to remote code execution. For the first time, our results systematically demonstrate the dangers of server-side gadgets and call for further research to solve the problem.
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.
8 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes cites How the Web Tangled Itself: Uncovering the History of Client-Side Web (In)Security
- GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes cites Finding and Preventing Bugs in JavaScript Bindings
- GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes cites Code-Reuse Attacks for the Web: Breaking Cross-Site Scripting Mitigations via Script Gadgets
- GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes cites SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
- GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes cites Small World with High Risks: A Study of Security Threats in the npm Ecosystem
- The First Large-Scale Systematic Study of Python Class Pollution Vulnerability cites GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes
- Test Suites Guided Vulnerability Validation for Node.js Applications cites Small World with High Risks: A Study of Security Threats in the npm Ecosystem
- In the DOM We Trust: Exploring the Hidden Dangers of Reading from the DOM on the Web cites GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes
- In the DOM We Trust: Exploring the Hidden Dangers of Reading from the DOM on the Web cites Code-Reuse Attacks for the Web: Breaking Cross-Site Scripting Mitigations via Script Gadgets
- Small World with High Risks: A Study of Security Threats in the npm Ecosystem cites Finding and Preventing Bugs in JavaScript Bindings
- 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
- Bullseye: Detecting Prototype Pollution in NPM Packages with Proof of Concept Exploits cites GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes
- Bullseye: Detecting Prototype Pollution in NPM Packages with Proof of Concept Exploits cites Test Suites Guided Vulnerability Validation for Node.js Applications
Cited by top-tier papers8
- GHunter: Universal Prototype Pollution Gadgets in JavaScript RuntimesEric Cornelissen, Mikhail Shcherbakov, Musard BalliuUSENIX Security 2024 · 5 citations
- Bullseye: Detecting Prototype Pollution in NPM Packages with Proof of Concept ExploitsTariq Houis, Shaoqi Jiang, Mohammad Mannan, Amr YoussefNDSS 2026 · 2 citations
- The First Large-Scale Systematic Study of Python Class Pollution VulnerabilityZhengyu Liu, Jiacheng Zhong, Jianjia Yu, Muxi Lyu et al.S&P 2026
- Test Suites Guided Vulnerability Validation for Node.js ApplicationsChanghua Luo, Penghui Li, Wei Meng, Chao ZhangCCS 2024
- In the DOM We Trust: Exploring the Hidden Dangers of Reading from the DOM on the WebJan Drescher, Sepehr Mirzaei, Soheil Khodayari, David Klein et al.CCS 2025
Builds on16
- 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
- SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JSCristian-Alexandru Staicu, Michael Pradel, Benjamin LivshitsNDSS 2018 · 91 citations
- How the Web Tangled Itself: Uncovering the History of Client-Side Web (In)SecurityBen Stock, Martin Johns, Marius Steffens, Michael BackesUSENIX Security 2017 · 67 citations
- Finding and Preventing Bugs in JavaScript BindingsFraser Brown, Shravan Narayan, Riad S. Wahby, Dawson R. Engler et al.S&P 2017 · 63 citations
- 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
Related papers
- Silent Spring: Prototype Pollution Leads to Remote Code Execution in Node.jsMikhail Shcherbakov, Musard Balliu, Cristian-Alexandru StaicuUSENIX Security 2023
- NodeMedic-FINE: Automatic Detection and Exploit Synthesis for Node.js VulnerabilitiesDarion Cassel, Nuno Sabino, Min-Chien Hsu, Ruben Martins et al.NDSS 2025
- Follow My Flow: Unveiling Client-Side Prototype Pollution Gadgets from One Million Real-World WebsitesZifeng Kang, Muxi Lyu, Zhengyu Liu, Jianjia Yu et al.S&P 2025
- Detecting Node.js prototype pollution vulnerabilities via object lookup analysisSong Li, Mingqing Kang, Jianwei Hou, Yinzhi CaoFSE 2021 · 49 citations
- Extracting taint specifications for JavaScript librariesCristian-Alexandru Staicu, Martin Toldam Torp, Max Schäfer, Anders Møller et al.ICSE 2020 · 34 citations
