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

CVE-2026-104849: Tinypool Prototype Pollution RCE Vulnerability

CVE-2026-104849 is a prototype pollution flaw in Tinypool Node.js worker thread pool that enables remote code execution through Object.prototype manipulation. This article covers technical details, affected versions, and mitigation.

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-104849 Overview

CVE-2026-104849 is a prototype pollution vulnerability in Tinypool, a minimal Node.js worker thread pool library. Versions prior to 2.1.2 read the filename property from a caller-supplied options object passed to pool.run(task, options) without checking whether the property is an own property. A polluted Object.prototype.filename can therefore replace the intended worker module path. The flaw maps to [CWE-94] Improper Control of Generation of Code and allows an attacker who can first pollute the prototype to load attacker-controlled JavaScript inside worker threads. The code executes with the host process's privileges and can read or modify any task data.

Critical Impact

An attacker able to pollute Object.prototype can hijack Tinypool worker loading to execute arbitrary JavaScript in the host Node.js process.

Affected Products

  • Tinypool versions prior to 2.1.2
  • Node.js applications passing a caller-supplied options object to pool.run(task, options)
  • Downstream libraries and test frameworks that embed Tinypool as a worker pool implementation

Discovery Timeline

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

Technical Details for CVE-2026-104849

Vulnerability Analysis

Tinypool exposes a pool.run(task, options) API that spawns tasks on worker threads. The options object may include a filename property identifying the worker module to load. Prior to version 2.1.2, Tinypool resolved options.filename through normal property lookup, which traverses the prototype chain. If an attacker previously polluted Object.prototype.filename, every options object inherits that value unless it defines its own filename. The worker pool then loads the attacker-chosen module instead of the application's intended worker script.

Applications that call pool.run(task) without a second argument are not affected, because Tinypool uses a trusted default options object in that case. Only call sites that forward a user-constructed options object expose the vulnerable path. Once attacker JavaScript executes inside a worker thread, it inherits the host process's file system, network, and credential access.

Root Cause

The root cause is unguarded property access on an externally supplied object. Reading options.filename without an Object.prototype.hasOwnProperty.call(options, 'filename') check or a null-prototype copy allows prototype chain lookup. Combined with a separate prototype pollution primitive elsewhere in the application or its dependencies, this becomes a code injection sink classified under [CWE-94].

Attack Vector

Exploitation requires two steps. First, the attacker must achieve prototype pollution through another vulnerability, for example a merge, clone, or JSON parsing gadget that sets Object.prototype.filename to an attacker-controlled module path or data URL. Second, the application must invoke pool.run(task, options) with an options object lacking its own filename property. The worker pool then imports the attacker's module and executes it on the worker thread.

typescript
// Patch from Tinypool 2.1.2 - src/common.ts
// Copy own properties onto a prototype-less object, so that options are never
// resolved through a polluted prototype chain.
export function withNullPrototype<T extends object>(source: T): T {
  return Object.assign(Object.create(null), source)
}

Source: GitHub Commit f41411a

The fix wraps caller-supplied options in a null-prototype object before any property reads, so inherited filename values from Object.prototype cannot reach the worker loader.

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-104849

Indicators of Compromise

  • Node.js worker threads loading JavaScript modules from unexpected file paths, URLs, or data: schemes.
  • Child processes or outbound network connections originating from worker threads that normally only perform CPU-bound work.
  • Runtime assignments to Object.prototype.filename or other reserved worker option keys detected via instrumentation.

Detection Strategies

  • Perform a software composition analysis scan to identify Tinypool versions below 2.1.2 in package-lock.json, yarn.lock, or pnpm-lock.yaml.
  • Add runtime assertions that call Object.hasOwn(options, 'filename') before invoking pool.run and alert on inherited values.
  • Review dependency graphs for libraries known to introduce prototype pollution gadgets, such as unsafe merge or recursive clone utilities.

Monitoring Recommendations

  • Instrument Node.js processes to log the resolved worker filename for every pool.run invocation and alert on paths outside an allowlist.
  • Enable file integrity monitoring on directories that host worker modules and flag unexpected module loads.
  • Correlate process telemetry with egress network logs to identify worker threads initiating unexpected outbound connections.

How to Mitigate CVE-2026-104849

Immediate Actions Required

  • Upgrade Tinypool to version 2.1.2 or later in all production and build pipelines.
  • Audit application code for pool.run(task, options) call sites and remove any filename propagation from untrusted input.
  • Patch or replace dependencies that contain prototype pollution sinks feeding Tinypool.

Patch Information

The fix landed in Tinypool 2.1.2 through pull request #135. It introduces a withNullPrototype helper in src/common.ts and src/index.ts that copies own properties onto a prototype-less object before resolving worker options. See the GitHub Security Advisory GHSA-85c8-ppgw-ccpr, Pull Request #135, and the v2.1.2 release notes for details.

Workarounds

  • Call pool.run(task) without a second argument wherever the default options object is sufficient, which uses Tinypool's trusted defaults.
  • Pass only null-prototype options objects created with Object.assign(Object.create(null), opts) to pool.run.
  • Freeze Object.prototype early in process startup with Object.freeze(Object.prototype) to block pollution primitives entirely.
bash
# Upgrade Tinypool to the patched release
npm install tinypool@^2.1.2

# Verify the installed version across the dependency tree
npm ls tinypool

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.