Skip to main content
QUICK REVIEW

[Paper Review] Study of JavaScript Static Analysis Tools for Vulnerability Detection in Node.js Packages

Tiago Pereira Brito, Mafalda Ferreira|arXiv (Cornell University)|Jan 12, 2023
Web Application Security VulnerabilitiesComputer Science3 citations
TL;DR

This paper presents the first empirical study of static analysis tools for detecting vulnerabilities in Node.js packages, introducing a curated dataset of 957 real-world vulnerabilities from npm advisory reports. Despite evaluating nine tools, the best combination detected only 57.6% of vulnerabilities with a precision of 0.11%, revealing major gaps in current tooling for server-side JavaScript security.

ABSTRACT

With the emergence of the Node.js ecosystem, JavaScript has become a widely-used programming language for implementing server-side web applications. In this paper, we present the first empirical study of static code analysis tools for detecting vulnerabilities in Node.js code. To conduct a comprehensive tool evaluation, we created the largest known curated dataset of Node.js code vulnerabilities. We characterized and annotated a set of 957 vulnerabilities by analyzing information contained in npm advisory reports. We tested nine different tools and found that many important vulnerabilities appearing in the OWASP Top-10 are not detected by any tool. The three best performing tools combined only detect up to 57.6% of all vulnerabilities in the dataset, but at a very low precision of 0.11%. Our curated dataset offers a new benchmark to help characterize existing Node.js code vulnerabilities and foster the development of better vulnerability detection tools for Node.js code.

Motivation & Objective

  • To evaluate the effectiveness of static code analysis tools in detecting real-world vulnerabilities in Node.js packages.
  • To address the lack of a standardized, manually-verified benchmark dataset for server-side JavaScript vulnerabilities.
  • To identify gaps in current tooling, especially regarding OWASP Top-10 vulnerabilities, by analyzing detection coverage and precision.
  • To provide a publicly available, high-fidelity dataset to support future research in automated vulnerability detection for Node.js.

Proposed method

  • Constructed a curated dataset of 957 Node.js vulnerabilities by manually analyzing 1,359 npm advisory reports, focusing on real-world, confirmed vulnerabilities.
  • Selected nine fully automatic, static analysis tools suitable for CI/CD pipelines, excluding those requiring test suites or dependency scanning only.
  • Executed each tool on the curated dataset to assess detection accuracy, false positives, and false negatives.
  • Annotated vulnerabilities with precise locations and vulnerability types, including path traversal, XSS, command injection, and prototype pollution.
  • Used the VulcaN framework to automate the analysis pipeline and ensure reproducibility across tools.
  • Classified vulnerabilities based on severity and type, aligning with OWASP Top-10 categories to assess tool coverage.

Experimental results

Research questions

  • RQ1To what extent do existing static analysis tools detect real-world vulnerabilities in Node.js packages?
  • RQ2How do the top-performing tools compare in terms of precision and recall across different vulnerability types?
  • RQ3Which OWASP Top-10 vulnerabilities are most frequently missed by current static analysis tools?
  • RQ4How effective is the combination of multiple tools in improving overall detection coverage?

Key findings

  • The three best-performing tools combined detected only 57.6% of the 957 vulnerabilities in the curated dataset, indicating significant detection gaps.
  • The best-performing tool combination achieved a precision of just 0.11%, indicating a very high rate of false positives.
  • No tool detected all instances of critical OWASP Top-10 vulnerabilities such as SQL injection, XSS, and command injection.
  • Many vulnerabilities, especially in input validation and prototype pollution, were consistently missed across all evaluated tools.
  • The study revealed inconsistencies and errors in npm advisory reports, necessitating manual curation for reliable benchmarking.
  • The curated dataset of 957 vulnerabilities is the largest known manually-verified benchmark for Node.js vulnerability detection.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.