Lune

WWW2024Top-tier venue

(In)Security of File Uploads in Node.js

Harun Oz, Abbas Acar, Ahmet Aris, Güliz Seray Tuncay, Amin Kharraz, A. Selcuk Uluagac

Abstract

File upload is a critical feature incorporated by a myriad of web applications in an effort to enable users to share and manage their files conveniently. It has been used in many useful services such as file-sharing and social media. While file upload is an essential component of web applications, the lack of rigorous checks on the file name, type, and content of the uploaded files can result in security issues, often referred to as Unrestricted File Upload (UFU). In this study, we analyze the (in)security of popular file upload libraries and real-world applications in the Node.js ecosystem. To automate our analysis, we propose and implement NodeSec-a tool designed to analyze file upload insecurities in Node.js applications and libraries. NodeSec generates unique payloads and thoroughly evaluates the application's file upload security against 13 distinct UFU-type attacks. Utilizing NodeSec, we analyze the most popular file upload libraries and real-world applications in the Node.js ecosystem. Our analysis results reveal that some real-world web applications are vulnerable to UFU attacks and disclose serious security bugs in file upload libraries. As of this writing, we received 19 CVEs and two US-CERT cases for the security issues that we reported. Our findings provide strong evidence that dynamic features of Node.js applications introduce security shortcomings and that web developers should be cautious when implementing file upload features in their applications. Finally, combining our responsible disclosure experience and root cause analysis, we identified the main causes of significant security weaknesses in file uploads in Node.js.

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.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Abusing Hidden Properties to Attack the Node.js Ecosystem cites SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JS
  • Abusing Hidden Properties to Attack the Node.js Ecosystem cites Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • Abusing Hidden Properties to Attack the Node.js Ecosystem cites 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 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 Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web Servers
  • 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
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on9

  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. Freezing the Web: A Study of ReDoS Vulnerabilities in JavaScript-based Web ServersCristian-Alexandru Staicu, Michael PradelUSENIX Security 2018 · 125 citations
  3. SYNODE: Understanding and Automatically Preventing Injection Attacks on NODE.JSCristian-Alexandru Staicu, Michael Pradel, Benjamin LivshitsNDSS 2018 · 91 citations
  4. Modular call graph construction for security scanning of Node.js applicationsBenjamin Barslev Nielsen, Martin Toldam Torp, Anders MøllerISSTA 2021 · 47 citations
  5. Abusing Hidden Properties to Attack the Node.js EcosystemFeng Xiao, Jianwei Huang, Yichang Xiong, Guangliang Yang et al.USENIX Security 2021 · 35 citations

Related papers

  1. FUSE: Finding File Upload Bugs via Penetration TestingTaekjin Lee, Seongil Wi, Suyoung Lee, Sooel SonNDSS 2020
  2. Unveiling Security Vulnerabilities in Git Large File Storage ProtocolYuan Chen, Qinying Wang, Yong Yang, Yuanchao Chen et al.S&P 2025
  3. Automated Exploit Generation for Node.js PackagesFilipe Marques, Mafalda Ferreira, André Nascimento, Miguel E. Coimbra et al.PLDI 2025 · 5 citations
  4. Silent Spring: Prototype Pollution Leads to Remote Code Execution in Node.jsMikhail Shcherbakov, Musard Balliu, Cristian-Alexandru StaicuUSENIX Security 2023
  5. Extracting taint specifications for JavaScript librariesCristian-Alexandru Staicu, Martin Toldam Torp, Max Schäfer, Anders Møller et al.ICSE 2020 · 34 citations
Dusk over the sea between two cliffs drawn in fine vertical lines