Lune

S&P2024Top-tier venue

Undefined-oriented Programming: Detecting and Chaining Prototype Pollution Gadgets in Node.js Template Engines for Malicious Consequences

Zhengyu Liu, Kecheng An, Yinzhi Cao

Abstract

Prototype pollution is a type of recently-discovered, impactful vulnerability that affects JavaScript code. One important yet challenging research problem of prototype pollution is how to affect the logic—or precisely the controlor data-flow—of a target program and achieve an adversary’s malicious purpose such as Arbitrary Code Execution (ACE) and File Access Manipulation. Prior works have studied the detection of so-called gadgets, which lead polluted properties to flow to sinks related to code execution. While existing gadgets are successful in achieving malicious purposes, they are direct gadgets, i.e., flowing from polluted property directly to a sink without the influence of other polluted properties. However, given more and more gadgets are being fixed and the lack of direct gadgets in some libraries, the necessity for more complicated gadgets arises accordingly.In this paper, we design and implement the first framework, called Undefined-oriented Programming Framework (UOPF), to detect and chain gadgets that lead to sinks via concolic execution with undefined properties as symbols. We call it Undefined-oriented Programming because one gadget may alter the control- or data-flow of another gadget via polluting additional originally-undefined properties. UOPF generates both prototype pollution and normal program inputs to guide concolic execution to reach sinks. Our evaluation on Node.js template engines shows that UOPF detects 25 zero-day gadgets that existing works cannot detect and 13 of them are chained ones. We responsibly report these gadgets to their developers and five gadgets have already been fixed. We also compare UOPF with Silent Spring, the state-of-the-art gadget detection tool and our evaluation shows that UOPF outperforms Silent Spring significantly in both false positive and negative rates.

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.

11 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

  • GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes cites Detecting Node.js prototype pollution vulnerabilities via object lookup analysis
  • GHunter: Universal Prototype Pollution Gadgets in JavaScript Runtimes cites Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • Detecting Node.js prototype pollution vulnerabilities via object lookup analysis cites Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • Contextualizing Sink Knowledge for Java Vulnerability Discovery cites Detecting Node.js prototype pollution vulnerabilities via object lookup analysis
  • CoinDef: A Comprehensive Code Injection Defense for the Electron Framework cites Detecting Node.js prototype pollution vulnerabilities via object lookup analysis
  • Demystifying the Vulnerability Propagation and Its Evolution via Dependency Trees in the NPM Ecosystem cites Small World with High Risks: A Study of Security Threats in the npm Ecosystem
  • Artemis: Toward Accurate Detection of Server-Side Request Forgeries through LLM-Assisted Inter-procedural Path-Sensitive Taint Analysis cites JAW: Studying Client-side CSRF with Hybrid Property Graphs and Declarative Traversals
  • Artemis: Toward Accurate Detection of Server-Side Request Forgeries through LLM-Assisted Inter-procedural Path-Sensitive Taint Analysis cites Detecting Node.js prototype pollution vulnerabilities via object lookup analysis
  • 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 Detecting Node.js prototype pollution vulnerabilities via object lookup analysis
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers11

  1. Artemis: Toward Accurate Detection of Server-Side Request Forgeries through LLM-Assisted Inter-procedural Path-Sensitive Taint AnalysisYuchen Ji, Ting Dai, Zhichao Zhou, Yutian Tang et al.OOPSLA 2025 · 9 citations
  2. GHunter: Universal Prototype Pollution Gadgets in JavaScript RuntimesEric Cornelissen, Mikhail Shcherbakov, Musard BalliuUSENIX Security 2024 · 5 citations
  3. Contextualizing Sink Knowledge for Java Vulnerability DiscoveryFabian Fleischer, Cen Zhang, Joonun Jang, Jeongin Cho et al.S&P 2026 · 2 citations
  4. Bullseye: Detecting Prototype Pollution in NPM Packages with Proof of Concept ExploitsTariq Houis, Shaoqi Jiang, Mohammad Mannan, Amr YoussefNDSS 2026 · 2 citations
  5. CoinDef: A Comprehensive Code Injection Defense for the Electron FrameworkZheng Yang, Simon P. Chung, Jizhou Chen, Runze Zhang et al.S&P 2025

Builds on25

  1. SOK: (State of) The Art of War: Offensive Techniques in Binary AnalysisYan Shoshitaishvili, Ruoyu Wang, Christopher Salls, Nick Stephens et al.S&P 2016 · 1,085 citations
  2. 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
  3. Demystifying the Vulnerability Propagation and Its Evolution via Dependency Trees in the NPM EcosystemChengwei Liu, Sen Chen, Lingling Fan, Bihuan Chen et al.ICSE 2022 · 94 citations
  4. JAW: Studying Client-side CSRF with Hybrid Property Graphs and Declarative TraversalsSoheil Khodayari, Giancarlo PellegrinoUSENIX Security 2021 · 51 citations
  5. Detecting Node.js prototype pollution vulnerabilities via object lookup analysisSong Li, Mingqing Kang, Jianwei Hou, Yinzhi CaoFSE 2021 · 49 citations

Related papers

  1. 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
  2. Silent Spring: Prototype Pollution Leads to Remote Code Execution in Node.jsMikhail Shcherbakov, Musard Balliu, Cristian-Alexandru StaicuUSENIX Security 2023
  3. Unveiling the Invisible: Detection and Evaluation of Prototype Pollution Gadgets with Dynamic Taint AnalysisMikhail Shcherbakov, Paul Moosbrugger, Musard BalliuWWW 2024 · 8 citations
  4. Efficient Detection of Java Deserialization Gadget Chains via Bottom-up Gadget Search and Dataflow-aided Payload ConstructionBofei Chen, Lei Zhang, Xinyou Huang, Yinzhi Cao et al.S&P 2024 · 12 citations
  5. The DOMino Effect: Detecting and Exploiting DOM Clobbering Gadgets via Concolic Execution with Symbolic DOMZhengyu Liu, Theo Lee, Jianjia Yu, Zifeng Kang et al.USENIX Security 2025
Dusk over the sea between two cliffs drawn in fine vertical lines