Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. node-worker-threads-pool
  4. ›
  5. CVE-2021-29057

CVE-2021-29057: SUCHMOKUO node-worker-threads-pool denial of service Vulnerability

August 11, 2023 (updated October 3, 2024)

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.

This can be mitigated by manually creating a timeout. For example:

const { StaticPool } = require(\"node-worker-threads-pool\");

const staticPool = new StaticPool({
size: 1,
task: (n) => {
while (n) {
console.log(\"a\");
}
return n;
}
});

staticPool.createExecutor().setTimeout(10).exec(1).then((result) => {
console.log(\"result from thread pool:\", result);
}).catch(() => console.error('timeout'));

References

  • github.com/SUCHMOKUO/node-worker-threads-pool
  • github.com/SUCHMOKUO/node-worker-threads-pool/issues/20
  • github.com/advisories/GHSA-7vxc-q7rv-qfj8
  • nvd.nist.gov/vuln/detail/CVE-2021-29057

Code Behaviors & Features

Detect and mitigate CVE-2021-29057 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions up to 1.4.3

Solution

Unfortunately, there is no solution available yet.

Impact 6.5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-400: Uncontrolled Resource Consumption
  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

npm/node-worker-threads-pool/CVE-2021-29057.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:17:18 +0000.