Lune

USENIX Security2023顶会

Silent Spring: Prototype Pollution Leads to Remote Code Execution in Node.js

Mikhail Shcherbakov, Musard Balliu, Cristian-Alexandru Staicu

摘要

Prototype pollution is a dangerous vulnerability affecting prototype-based languages like JavaScript and the Node.js platform. It refers to the ability of an attacker to inject properties into an object's root prototype at runtime and subsequently trigger the execution of legitimate code gadgets that access these properties on the object's prototype, leading to attacks such as Denial of Service (DoS), privilege escalation, and Remote Code Execution (RCE). While there is anecdotal evidence that prototype pollution leads to RCE, current research does not tackle the challenge of gadget detection, thus only showing feasibility of DoS attacks, mainly against Node.js libraries. In this paper, we set out to study the problem in a holistic way, from the detection of prototype pollution to detection of gadgets, with the ambitious goal of finding end-to-end exploits beyond DoS, in full-fledged Node.js applications. We build the first multi-staged framework that uses multi-label static taint analysis to identify prototype pollution in Node.js libraries and applications, as well as a hybrid approach to detect universal gadgets, notably, by analyzing the Node.js source code. We implement our framework on top of GitHub's static analysis framework CodeQL to find 11 universal gadgets in core Node.js APIs, leading to code execution. Furthermore, we use our methodology in a study of 15 popular Node.js applications to identify prototype pollutions and gadgets. We manually exploit eight RCE vulnerabilities in three high-profile applications such as NPM CLI, Parse Server, and Rocket.Chat. Our results provide alarming evidence that prototype pollution in combination with powerful universal gadgets lead to RCE in Node.js.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 24 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Undefined-oriented Programming: Detecting and Chaining Prototype Pollution Gadgets in Node.js Template Engines for Malicious Consequences 引用了 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 引用了 Finding and Preventing Bugs in JavaScript Bindings
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript 引用了 SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript 引用了 BreakApp: Automated, Flexible Application Compartmentalization
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript 引用了 Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS 引用了 Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • DONAPI: Malicious NPM Packages Detector using Behavior Sequence Knowledge Mapping 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security Implications 引用了 Finding and Preventing Bugs in JavaScript Bindings
  • Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security Implications 引用了 SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScript
  • Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security Implications 引用了 SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
  • Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security Implications 引用了 Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security Implications 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • Unveiling the Invisible: Detection and Evaluation of Prototype Pollution Gadgets with Dynamic Taint Analysis 引用了 Finding and Preventing Bugs in JavaScript Bindings
  • Unveiling the Invisible: Detection and Evaluation of Prototype Pollution Gadgets with Dynamic Taint Analysis 引用了 SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
  • Unveiling the Invisible: Detection and Evaluation of Prototype Pollution Gadgets with Dynamic Taint Analysis 引用了 Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • 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
  • Small World with High Risks: A Study of Security Threats in the npm Ecosystem 引用了 BreakApp: Automated, Flexible Application Compartmentalization
  • Small World with High Risks: A Study of Security Threats in the npm Ecosystem 引用了 Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper24

  1. DONAPI: Malicious NPM Packages Detector using Behavior Sequence Knowledge MappingCheng Huang, Nannan Wang, Ziyan Wang, Siqi Sun 等USENIX Security 2024 · 38 次引用
  2. SecBench.js: An Executable Security Benchmark Suite for Server-Side JavaScriptMasudul Hasan Masud Bhuiyan, Adithya Srinivas Parthasarathy, Nikos Vasilakis, Michael Pradel 等ICSE 2023 · 20 次引用
  3. Undefined-oriented Programming: Detecting and Chaining Prototype Pollution Gadgets in Node.js Template Engines for Malicious ConsequencesZhengyu Liu, Kecheng An, Yinzhi CaoS&P 2024 · 17 次引用
  4. Jack-in-the-box: An Empirical Study of JavaScript Bundling on the Web and its Security ImplicationsJeremy Rack, Cristian-Alexandru StaicuCCS 2023 · 11 次引用
  5. Unveiling the Invisible: Detection and Evaluation of Prototype Pollution Gadgets with Dynamic Taint AnalysisMikhail Shcherbakov, Paul Moosbrugger, Musard BalliuWWW 2024 · 8 次引用

它引用的 Paper20

  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 次引用
  2. Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web ServersCristian-Alexandru Staicu, Michael PradelUSENIX Security 2018 · 125 次引用
  3. SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JSCristian-Alexandru Staicu, Michael Pradel, Benjamin LivshitsNDSS 2018 · 91 次引用
  4. BreakApp: Automated, Flexible Application CompartmentalizationNikos Vasilakis, Ben Karel, Nick Roessler, Nathan Dautenhahn 等NDSS 2018 · 66 次引用
  5. Finding and Preventing Bugs in JavaScript BindingsFraser Brown, Shravan Narayan, Riad S. Wahby, Dawson R. Engler 等S&P 2017 · 63 次引用

相关 Paper

  1. GHunter: Universal Prototype Pollution Gadgets in JavaScript RuntimesEric Cornelissen, Mikhail Shcherbakov, Musard BalliuUSENIX Security 2024 · 5 次引用
  2. Detecting Node.js prototype pollution vulnerabilities via object lookup analysisSong Li, Mingqing Kang, Jianwei Hou, Yinzhi CaoFSE 2021 · 49 次引用
  3. Bullseye: Detecting Prototype Pollution in NPM Packages with Proof of Concept ExploitsTariq Houis, Shaoqi Jiang, Mohammad Mannan, Amr YoussefNDSS 2026 · 2 次引用
  4. 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
  5. Extracting taint specifications for JavaScript librariesCristian-Alexandru Staicu, Martin Toldam Torp, Max Schäfer, Anders Møller 等ICSE 2020 · 34 次引用
黄昏的海面,两侧是细线勾勒的悬崖