Vulnerabilities in pkg:npm/node-worker-threads-pool
PACKAGECVE-2021-29057 is a MODERATE (CVSS 6.5) denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Node worker threads pool libraries in the npm ecosystem. The issue involves suchmokuo node-worker-threads-pool denial of service vulnerability. Remediation is available in the latest vendor maintenance releases.
pkg:npm/node-worker-threads-pool
Vulnerability advisories affecting package pkg:npm/node-worker-threads-pool. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-7vxc-q7rv-qfj8 | CVE-2021-29057 | MODERATE | SUCHMOKUO node-worker-threads-pool denial of service Vulnerability |
CVE-2021-29057 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2021-29057
To remediate this vulnerability, upgrade all affected Node worker threads pool 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 node-worker-threads-pool@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls node-worker-threads-pool
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2021-29057, inspect your project dependencies using npm:
npm ls node-worker-threads-pool
Analyze the terminal output to locate any version of Node worker threads pool in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls node-worker-threads-pool 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-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Node worker threads pool, 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-2021-29057 Affected Node worker threads pool Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
node-worker-threads-pool
|
npm |
≤ 1.4.3
|
|
References
Frequently Asked Questions
What is CVE-2021-29057?
Which Node worker threads pool versions are affected?
What version fixes CVE-2021-29057?
Is node-worker-threads-pool affected?
What is the CVSS score of CVE-2021-29057?
What CWE is associated with CVE-2021-29057?
How can I check npm dependencies for CVE-2021-29057?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-7vxc-q7rv-qfj8",
"modified" : "2024-10-03T17:26:26Z",
"published" : "2023-08-11T15:30:46Z",
"aliases" : [ "CVE-2021-29057" ],
"summary" : "SUCHMOKUO node-worker-threads-pool denial of service Vulnerability",
"details" : "An issue was discovered in StaticPool in SUCHMOKUO node-worker-threads-pool version 1.4.3 that allows attackers to cause a denial of service.\n\nThis can be mitigated by manually creating a timeout. For example:\n\n```ts\nconst { StaticPool } = require(\\\"node-worker-threads-pool\\\");\n\t\n\tconst staticPool = new StaticPool({\n size: 1,\n task: (n) => {\n while (n) {\n console.log(\\\"a\\\");\n }\n return n;\n }\n});\n \n staticPool.createExecutor().setTimeout(10).exec(1).then((result) => {\n console.log(\\\"result from thread pool:\\\", result);\n}).catch(() => console.error('timeout'));\n```",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "node-worker-threads-pool"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "1.4.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-29057"
}, {
"type" : "WEB",
"url" : "https://github.com/SUCHMOKUO/node-worker-threads-pool/issues/20"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/SUCHMOKUO/node-worker-threads-pool"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-400", "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-11T22:16:44Z",
"nvd_published_at" : "2023-08-11T14:15:12Z"
}
}