CVE-2026-104849: Tinypool Remote Code Execution Vulnerability
CRITICALCVE-2026-104849 is a CRITICAL remote code execution vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Tinypool libraries in the npm ecosystem. The issue involves prototype pollution gadget to rce in run() options. Remediation is available by upgrading affected packages to version 2.1.2.
CVE-2026-104849 at a Glance
How to Fix CVE-2026-104849
To remediate this vulnerability, upgrade all affected Tinypool dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install tinypool@2.1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls tinypool
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-104849, inspect your project dependencies using npm:
npm ls tinypool
Analyze the terminal output to locate any version of Tinypool in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.1.2), your application is affected.
Note: The npm ls tinypool command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Tinypool, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-104849 Affected Tinypool Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
tinypool
|
npm |
< 2.1.2
|
2.1.2
|
References
Frequently Asked Questions
What is CVE-2026-104849?
Which Tinypool versions are affected?
What version fixes CVE-2026-104849?
Is tinypool affected?
What CWE is associated with CVE-2026-104849?
How can I check npm dependencies for CVE-2026-104849?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-85c8-ppgw-ccpr",
"modified" : "2026-10-05T22:49:52Z",
"published" : "2026-10-05T22:49:52Z",
"aliases" : [ "CVE-2026-104849" ],
"summary" : "Tinypool: Prototype Pollution Gadget to RCE in run() options",
"details" : "`tinypool` is a fork of `piscina` and inherited the same prototype-pollution surface. When `pool.run(task, options)` is called, the `filename` option is read from the provided `options` object. If that object does not have an own `filename` property, the lookup falls through to `Object.prototype`.\n\nAn attacker who can pollute `Object.prototype.filename` (for example, via a vulnerable `lodash.merge`, `qs.parse`, or similar elsewhere in the application) can make tinypool load and execute an attacker-controlled worker module.\n\nThis is the tinypool counterpart to the piscina root discovery [GHSA-x9g3-xrwr-cwfg](https://github.com/piscinajs/piscina/security/advisories/GHSA-x9g3-xrwr-cwfg).\n\n`pool.run(task)` with no second argument is not affected, because `kDefaultOptions.filename` is `null` and the options object is not user-controlled. The exploit only triggers when the caller passes their own options object to `pool.run()`.\n\n## Impact\n\nArbitrary JavaScript execution in the worker pool. If the application passes attacker-controlled data as the `run()` task and also supplies a `run()` options object, the attacker can redirect execution to a malicious worker that exfiltrates or modifies that data, achieving remote code execution and/or data exfiltration.\n\n## Proof of Concept\n\n```js\n// legitimate-worker.mjs\nexport default async (task) => ({ by: 'legitimate-worker', processed: task })\n\n// malicious-worker.mjs\nexport default async (task) => ({ by: 'attacker', stolenRequestBody: task })\n\n// main.js\nimport express from \"express\";\nimport Tinypool from \"tinypool\";\nimport { fileURLToPath } from \"node:url\";\nimport path from \"node:path\";\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\n// Simulate upstream prototype pollution (lodash merge, qs parse, etc.)\nObject.prototype.filename = path.join(__dirname, \"malicious-worker.mjs\");\n\nconst pool = new Tinypool({\n filename: path.join(__dirname, \"legitimate-worker.mjs\"),\n});\n\nexpress()\n .use(express.json())\n .post(\"/\", async (req, res) => {\n const ac = new AbortController();\n const result = await pool.run(req.body, { signal: ac.signal });\n res.json(result);\n })\n .listen(31337);\n```\n\n## Suggested fix\n\nRead all user-supplied options from own properties only (`Object.hasOwn` or `Object.prototype.hasOwnProperty.call`) and build the internal `ThreadPool.options` object with a null prototype.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "tinypool"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/tinylibs/tinypool/security/advisories/GHSA-85c8-ppgw-ccpr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-104849"
}, {
"type" : "WEB",
"url" : "https://github.com/tinylibs/tinypool/pull/135"
}, {
"type" : "WEB",
"url" : "https://github.com/tinylibs/tinypool/commit/f41411a3e23324c674f35a19a3240f7a7c40ffbf"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tinylibs/tinypool"
}, {
"type" : "WEB",
"url" : "https://github.com/tinylibs/tinypool/releases/tag/v2.1.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321", "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-10-05T22:49:52Z",
"nvd_published_at" : "2026-10-02T17:17:03Z"
}
}