Skip to main content
Vulnerability Database/CVE-2026-104848

CVE-2026-104848: Tinypool Prototype Pollution RCE Vulnerability

CVE-2026-104848 is a prototype pollution vulnerability in Tinypool that enables remote code execution through malicious worker thread options. Attackers can exploit polluted prototypes to inject code into spawned workers. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-104848 Overview

CVE-2026-104848 is a prototype pollution vulnerability [CWE-1321] in Tinypool, a minimal Node.js worker thread pool implementation. Versions prior to 2.1.1 construct ThreadPool.options from a normal JavaScript object and read execArgv and env worker options from dist/index.js. Properties inherited from a polluted Object.prototype are copied into own properties and passed to worker_threads.Worker. An attacker who can first pollute either property can force every newly spawned worker to load attacker-selected JavaScript through command-line preload arguments or NODE_OPTIONS. The result is arbitrary code execution with the host process privileges.

Critical Impact

Successful exploitation yields code execution in CI/CD pipelines and build hosts, exposing CI secrets, signing material, and build artifacts.

Affected Products

  • Tinypool versions prior to 2.1.1
  • Node.js applications and CI/CD pipelines depending on Tinypool as a transitive worker pool library
  • Build tooling (such as test runners and bundlers) that embed Tinypool for parallel worker execution

Discovery Timeline

  • 2026-10-02 - CVE-2026-104848 published to NVD
  • 2026-10-02 - Last updated in NVD database

Technical Details for CVE-2026-104848

Vulnerability Analysis

Tinypool creates its internal options object using object spread syntax. Because the resulting object inherits from Object.prototype, any property placed on the prototype through a prior pollution gadget becomes visible on the merged options object. Tinypool then reads execArgv and env from that object and forwards them unchanged to worker_threads.Worker. The execArgv array can carry --require or --import preload flags, while env can inject NODE_OPTIONS. Either channel causes the new worker thread to load attacker-controlled JavaScript during startup. Code executes with the privileges of the host Node.js process, which in CI environments typically holds tokens, signing keys, and write access to build artifacts.

Root Cause

The root cause is unsafe object construction. The original code used { ...kDefaultOptions, ...options, filename, maxQueue: 0 }, producing an object whose prototype is Object.prototype. When a dependency pollutes Object.prototype.execArgv or Object.prototype.env, those values appear as inherited properties and are promoted to own properties during the spread. The library does not validate or sanitize execArgv and env before passing them to the worker thread constructor.

Attack Vector

Exploitation requires an existing prototype pollution primitive in the host application or one of its dependencies. The attacker sets Object.prototype.execArgv = ['--require', '/path/to/payload.js'] or Object.prototype.env = { NODE_OPTIONS: '--require /path/to/payload.js' }. The next worker Tinypool spawns loads the payload before user code runs. No network interaction with Tinypool itself is required once the pollution gadget exists.

typescript
     const filename = options.filename
       ? maybeFileURLToPath(options.filename)
       : null
-    this.options = { ...kDefaultOptions, ...options, filename, maxQueue: 0 }
+
+    this.options = Object.assign(
+      Object.create(null),
+      kDefaultOptions,
+      options,
+      { filename, maxQueue: 0 }
+    )
+
     // The >= and <= could be > and < but this way we get 100 % coverage 🙃
     if (
       options.maxThreads !== undefined &&

Source: GitHub Commit 24df4e7. The patch replaces the object spread with Object.assign over a null-prototype object, so inherited properties can no longer bleed into this.options.

Stop Remote Code Execution Before It Runs

Singularity™ Endpoint detects and blocks exploit attempts at machine speed, including zero-days and novel attack techniques.

Stop Exploit Attempts

Detection Methods for CVE-2026-104848

Indicators of Compromise

  • Node.js worker processes started with unexpected --require, --import, or --experimental-loader flags in execArgv
  • NODE_OPTIONS environment variables containing preload directives in CI/CD build logs
  • Outbound network connections from CI runners to attacker-controlled domains during test or build phases
  • Access to CI secrets, signing keys, or artifact storage from short-lived worker threads

Detection Strategies

  • Audit package-lock.json and yarn.lock for Tinypool versions earlier than 2.1.1, including transitive dependencies pulled in by test runners and bundlers
  • Instrument CI runners to log the full command line and environment of every spawned Node.js worker and alert on unexpected preload flags
  • Perform static analysis for known prototype pollution sinks such as unsafe Object.assign, _.merge, and recursive object mergers in the dependency graph

Monitoring Recommendations

  • Track process creation events for node child processes with non-standard execArgv values
  • Monitor read access to CI secret stores and signing material from Node.js worker threads
  • Alert on egress traffic from build agents to domains outside the organization's allowlist

How to Mitigate CVE-2026-104848

Immediate Actions Required

  • Upgrade Tinypool to version 2.1.1 or later across all direct and transitive dependencies
  • Rotate CI/CD secrets, signing keys, and build tokens that may have been exposed on affected runners
  • Review recent build artifacts for signs of tampering before promoting them to production
  • Identify and remediate upstream prototype pollution gadgets in the application dependency graph

Patch Information

The fix ships in Tinypool 2.1.1 via pull request #134 and commit 24df4e7. The patched constructor builds this.options on a null-prototype object using Object.assign(Object.create(null), ...), blocking inherited properties from reaching worker_threads.Worker. See the GitHub Security Advisory GHSA-5gmw-xhrv-c9v3 and the v2.1.1 release notes.

Workarounds

  • Pin Tinypool to 2.1.1 or later using npm overrides or pnpm.overrides when transitive dependencies lag behind
  • Freeze Object.prototype early in process startup with Object.freeze(Object.prototype) where application compatibility allows
  • Run CI builds with least-privilege service accounts and ephemeral runners to limit the blast radius of worker-level code execution
bash
# Configuration example
npm install tinypool@^2.1.1

# Enforce the fixed version across transitive dependencies (npm >= 8.3)
# package.json
#   "overrides": {
#     "tinypool": "^2.1.1"
#   }

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.