Advisory

GHSA-7vxc-q7rv-qfj8

Also known as: 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.

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'));

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2023-08-11 15:30 UTC
Modified
2024-10-03 17:26 UTC

Affected packages and fixes

node-worker-threads-pool

npm · All systems

Affected

  • introduced 0, last affected 1.4.3 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences