Unveiling the Invisible: Detection and Evaluation of Prototype Pollution Gadgets with Dynamic Taint Analysis
Mikhail Shcherbakov, Paul Moosbrugger, Musard Balliu
摘要
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.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 8 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes 引用了 How the Web Tangled Itself: Uncovering the History of Client-Side Web (In)Security
- GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes 引用了 Finding and Preventing Bugs in JavaScript Bindings
- GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes 引用了 Code-Reuse Attacks for the Web: Breaking Cross-Site Scripting Mitigations via Script Gadgets
- GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes 引用了 SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
- GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes 引用了 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 引用了 GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes
- Test Suites Guided Vulnerability Validation for Node.js Applications 引用了 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 引用了 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 引用了 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 引用了 Finding and Preventing Bugs in JavaScript Bindings
- Small World with High Risks: A Study of Security Threats in the npm Ecosystem 引用了 SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
- Bullseye: Detecting Prototype Pollution in NPM Packages with Proof of Concept Exploits 引用了 GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes
- Bullseye: Detecting Prototype Pollution in NPM Packages with Proof of Concept Exploits 引用了 Test Suites Guided Vulnerability Validation for Node.js Applications
引用它的顶会 Paper8
- GHunter: Universal Prototype Pollution Gadgets in JavaScript RuntimesEric Cornelissen, Mikhail Shcherbakov, Musard BalliuUSENIX Security 2024 · 5 次引用
- Bullseye: Detecting Prototype Pollution in NPM Packages with Proof of Concept ExploitsTariq Houis, Shaoqi Jiang, Mohammad Mannan, Amr YoussefNDSS 2026 · 2 次引用
- The First Large-Scale Systematic Study of Python Class Pollution VulnerabilityZhengyu Liu, Jiacheng Zhong, Jianjia Yu, Muxi Lyu 等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 等CCS 2025
它引用的 Paper16
- 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 次引用
- SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JSCristian-Alexandru Staicu, Michael Pradel, Benjamin LivshitsNDSS 2018 · 91 次引用
- How the Web Tangled Itself: Uncovering the History of Client-Side Web (In)SecurityBen Stock, Martin Johns, Marius Steffens, Michael BackesUSENIX Security 2017 · 67 次引用
- Finding and Preventing Bugs in JavaScript BindingsFraser Brown, Shravan Narayan, Riad S. Wahby, Dawson R. Engler 等S&P 2017 · 63 次引用
- Code-Reuse Attacks for the Web: Breaking Cross-Site Scripting Mitigations via Script GadgetsSebastian Lekies, Krzysztof Kotowicz, Samuel Groß, Eduardo A. Vela Nava 等CCS 2017 · 62 次引用
相关 Paper
- 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 等NDSS 2025
- Follow My Flow: Unveiling Client-Side Prototype Pollution Gadgets from One Million Real-World WebsitesZifeng Kang, Muxi Lyu, Zhengyu Liu, Jianjia Yu 等S&P 2025
- Detecting Node.js prototype pollution vulnerabilities via object lookup analysisSong Li, Mingqing Kang, Jianwei Hou, Yinzhi CaoFSE 2021 · 49 次引用
- Extracting taint specifications for JavaScript librariesCristian-Alexandru Staicu, Martin Toldam Torp, Max Schäfer, Anders Møller 等ICSE 2020 · 34 次引用
