arXiv(opens in a new tab)cs.CROct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.18585

X.js: A Live Benchmark for Node.js Taint-Style Vulnerabilities

José Afonso, João Madeira Pereira, Ronghao Ni, Limin Jia, José Fragoso Santos, Pedro Adão

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

JOSÉ AFONSO, INESC-ID / IST, ULisboa, Portugal

JOÃO MADEIRA PEREIRA, Carnegie Mellon University, USA and INESC-ID / IST, ULisboa, Portugal

RONGHAO NI, Carnegie Mellon University, USA

LIMIN JIA, Carnegie Mellon University, USA

JOSÉ FRAGOSO SANTOS, INESC-ID / IST, ULisboa, Portugal

PEDRO ADÃO, Instituto de Telecomunicações / IST, ULisboa, Portugal

JavaScript vulnerabilities in npm packages pose a significant risk to the Node.js ecosystem, and a growing body of work aims to detect, exploit, and mitigate them. Studying and evaluating this work requires up-to-date collections of real vulnerabilities, yet the most commonly used datasets stop recording vulnerabilities in 2022.

We present x.js, a live benchmark of real-world Node.js taint-style vulnerabilities covering code and command injection, prototype pollution, and path traversal. Built from 1,738 advisories collected through mid-2026, primarily from the GitHub Advisory Database, x.js pairs each vulnerability with precise source and sink locations, a validated executable exploit and its execution trace, and, when available, a patched version of the package. x.js supports long-term reproducibility and growth: dependencies are mirrored in a self-hosted registry to guard against package removal from the ecosystem, and dedicated infrastructure generates and validates exploits for newly reported vulnerabilities. The current release contains 1,159 validated exploits for 965 packages. Using x.js, we characterize how the frequency, structure, and complexity of Node.js taint-style vulnerabilities have evolved over time. We find that these vulnerabilities are increasingly reported in large packages: the median vulnerable package grew from roughly 250 LoC in 2021–2022 to 6,100 LoC in 2026.

CCS Concepts: • Security and privacy → Software and application security.

Additional Key Words and Phrases: Node.js, Vulnerability, Dataset

1 Introduction

JavaScript is among the most widely used programming languages, and much of its reach today comes from Node.js [35], a V8-based server-side runtime. Node.js underpins production software ranging from developer tooling [30] to widely deployed desktop applications [15, 41]; its package ecosystem, npm, is the world's largest software repository, with millions of reusable packages. Vulnerabilities in npm packages threaten both their direct users and the wider ecosystem: a single flaw can affect thousands of downstream packages through their dependencies, potentially enabling sophisticated supply-chain attacks [28]. This risk has motivated substantial recent work on detecting, confirming, and repairing server-side JavaScript vulnerabilities [9, 10, 13, 18, 24, 26, 43]. LLM-based tools have also been applied to vulnerability detection and confirmation [16, 27, 31, 32, 40, 45, 52].

Most tools focus on vulnerabilities with severe consequences [10, 18, 24, 26, 29]: code injection, in which attacker-controlled input is evaluated as program code; OS command injection, in which it reaches an operating system command; prototype pollution, in which it modifies the attributes of a built-in object prototype; and path traversal, in which it manipulates a file-system path to access unintended files. Prior work [10, 18] refers to these as taint-style vulnerabilities as they occur when attacker-controlled (tainted) inputs enter a program through its public APIs, known as sources, and propagate to sensitive code locations, known as sinks, such as eval().

Authors' Contact Information: José Afonso, jose.pinto.afonso@tecnico.ulisboa.pt, INESC-ID / IST, ULisboa, Lisbon, Portugal; João Madeira Pereira, jhenriqu@andrew.cmu.edu, Carnegie Mellon University, Pittsburgh, USA and INESC-ID / IST, ULisboa, Lisbon, Portugal; Ronghao Ni, ronghaon@andrew.cmu.edu, Carnegie Mellon University, Pittsburgh, USA; Limin Jia, liminjia@andrew.cmu.edu, Carnegie Mellon University, Pittsburgh, USA; José Fragoso Santos, jose.fragoso.santos@tecnico.ulisboa.pt, INESC-ID / IST, ULisboa, Lisbon, Portugal; Pedro Adão, pedro.adao@tecnico.ulisboa.pt, Instituto de Telecomunicações / IST, ULisboa, Lisbon, Portugal.

José Afonso, João Madeira Pereira, Ronghao Ni, Limin Jia, José Fragoso Santos, and Pedro Adão

Evaluating vulnerability-detection tools rigorously requires carefully engineered ground-truth datasets. Such datasets must be accurate, containing only true vulnerabilities, and rich in metadata to support vulnerability validation and deduplication. For taint-style vulnerabilities, desirable metadata includes a proof-of-concept (PoC) exploit for confirming the vulnerability, the locations of the sources and sinks, and the PoC's execution trace, which helps uniquely identify a vulnerability instance. Further, recent vulnerability datasets [14, 25, 33, 47, 48] support the evaluation of code LLMs and agents, and have introduced paired vulnerable and patched versions of functions or packages to assess LLM hallucinations and their tendency to over-report vulnerabilities. The two most commonly used datasets for Node.js taint-style vulnerabilities are VULCAN [7] and SECBENCH.js [5]. However, both datasets have been shown to contain inaccurate and incomplete vulnerability information [18], lack validated patches, and most importantly, are outdated, with the most recent CVE dating back to 2022. Recent trends, such as the widespread adoption of code LLMs, may have reshaped the software vulnerability landscape, raising concerns about the representativeness of evaluations based on older packages. Notably, vulnerabilities reported in recent years affect substantially larger packages, with the median vulnerable package size increasing from approximately 250 LoC in 2021–2022 to 6,100 LoC in 2026 (§5).

To fill this gap and enable rigorous and reproducible tool evaluations, we present x.js, a live benchmark of Node.js taint-style vulnerabilities, supported by a pipeline for advisory collection and PoC validation. x.js is designed to grow and to last. x.js's collection and validation pipeline turns newly reported advisories in the GitHub Advisory Database [19] into entries in the dataset. Then an LLM agent writes a candidate PoC, which is then validated. Manual inspection is needed only when a candidate PoC fails validation. To keep entries executable as npm packages are updated, unpublished, or removed, x.js uses a self-hosted package mirror, backed by Verdaccio [1], that stores the exact package versions each entry requires. Finally, each entry is paired, when one exists, with a patched version that has been checked against the PoC.

The main challenge is to generate the required metadata automatically and at scale while maintaining high precision. This requires a clear definition of a valid PoC and tools that reliably identify and reject invalid ones. Collecting precise source and sink locations and execution traces also poses a scalability challenge as naive instrumentation does not scale to large packages. x.js uses on-demand instrumentation to collect this information at scale. The current release covers advisories in the four targeted taint-style vulnerability classes from the GitHub Advisory Database [19] up to mid-2026, with links to the corresponding Snyk [42] advisories, and contains 1,159 validated exploits for 965 packages: more than twice as many vulnerabilities as SECBENCH.js and more than three times as many as VULCAN in the same four classes. Leveraging x.js, we examine how Node.js vulnerabilities have evolved over time. We characterize their complexity through the size of vulnerable packages and the amount of package and exploit code executed, and investigate how often a package is affected again by the same vulnerability class after it has been patched. Finally, we find two packages whose latest releases remain exploitable although their advisories list them as patched. In summary, this paper makes the following contributions:

  • A definition of exploit validity for taint-style vulnerabilities and a set of dynamic analyses that check it automatically, recovering the source, sink, and execution trace of each vulnerability along the way.

  • x.js, a live benchmark that currently contains 1,159 Node.js taint-style vulnerabilities across code injection, command injection, prototype pollution, and path traversal, each demonstrated by an executable exploit and, when one exists, paired with a patch checked against it.

  • A pipeline that makes x.js live: it incorporates newly reported advisories, generates and validates their exploits, checks their patches, and keeps entries reproducible through a self-hosted mirror of all required package versions.

  • An empirical study, enabled by x.js, of how the complexity of Node.js taint-style vulnerabilities has evolved over time and how often the same vulnerability class recurs in a package after being patched.

  • A public release of the benchmark metadata and supporting infrastructure, with PoCs available to researchers on request.

The remainder of this paper is organized as follows. Section 2 presents the background and motivation, including our attacker model, proof-of-concept exploits, and the conditions for exploit validity. Section 3 describes our pipeline for collecting advisories, constructing and validating exploits, checking patches, and gathering metadata. Section 4 presents x.js, its contents, its comparison with existing benchmarks, and how its entries remain executable over time. Section 5 uses x.js to study how Node.js vulnerabilities have evolved. Section 6 discusses limitations and threats to validity. Section 7 surveys related work, and Section 8 concludes.

References (9)