Togoder security

npm package security report

thread-stream@0.15.2 security report

Risky patterns found that deserve a look.

Needs review Version 0.15.2 Files reviewed 5 Size 20.2 KB Scanned

Summary

Togoder Security scanned the npm package thread-stream@0.15.2 on Oct 4, 2026. An AI review of 5 source files produced 6 low severity findings. The overall verdict is medium: the findings flag risky but common patterns (dynamic code, unsafe defaults, broad file or network access) rather than confirmed malware.

0
critical
0
high
0
medium
6
low

Findings 6

low

File system access outside package scope

NPS-386A02EAA484

The benchmark script opens and writes to /dev/null, which is a system device file. While writing to /dev/null is typically harmless for benchmarks, it is a file system operation outside the package scope and could be considered a minor concern.

bench.js:9
low

Dynamic module loading with computed path

NPS-72B647111498

The code constructs a path using join(__dirname, 'test', 'to-file.js') and passes it to ThreadStream, which likely loads and executes this file in a worker thread. Although the path is derived from __dirname and hardcoded segments, the use of a dynamically computed path could be a vector if the file were modified or path traversal were possible.

bench.js:17
low

Use of real-require to bypass require cache/modifications

NPS-D5B92EB7DF2F

The real-require package is used to invoke the original require/import functions, bypassing common monkey-patching. This is a known technique used to avoid instrumentation and could be abused, though here it appears intended to handle yarn PnP zip paths. Not inherently malicious, but notable.

lib/worker.js:3
low

Runtime require/import of ts-node and ts-node-dev

NPS-ABD52DC4D257

The code conditionally requires 'ts-node/register' or 'ts-node-dev' at runtime based on environment variables and file extensions. This can execute arbitrary code from those modules at import time. It is a legitimate use pattern for TypeScript support but increases the attack surface if those dependencies are compromised.

lib/worker.js:25
low

Dynamic module loading with computed input

NPS-CD1075E2F058

The worker dynamically loads a module using a filename provided via workerData. Depending on caller control, this could load unintended code. In this case the filename comes from the parent process, which is likely trusted, but the pattern is worth noting for supply-chain risk if untrusted input ever reaches workerData.

lib/worker.js:33
low

Worker thread dynamic code execution

NPS-EF6FD0AF115A

The file is designed to run in a worker thread and load and execute an external module using realImport/realRequire. This is core functionality of the ThreadStream worker and not exfiltration or backdoor behavior, but it is a dynamic code execution surface.

lib/worker.js:38

Files reviewed

FileVerdictWhat the reviewer saw
bench.js medium The file is a benchmark script with no obvious malicious intent, but it includes minor red flags: writing to /dev/null and dynamically loading a worker script from a computed path.
lib/worker.js medium No clear malicious patterns found; code is a worker-thread log writer that dynamically loads a module from parent-provided metadata, which is expected behavior but introduces dynamic execution and bypass-require concerns.
index.js safe No malicious patterns detected
lib/indexes.js safe Cleared by Jev triage; no further analysis needed
lib/wait.js safe Cleared by Jev triage; no further analysis needed

Affected version ranges

None of the 2 scanned versions of thread-stream are flagged high or critical. The latest scanned version, 4.0.0, is not scanned. Only versions we have scanned are listed; unscanned versions between them are not covered.

0.15.24.0.0
VersionsVerdictCountRangeTop findings
4.0.0 Not scanned 1 4.0.0
3.2.0 Needs review 1 3.2.0 dynamic module loading; worker thread dynamic execution
3.1.0 Not scanned 1 3.1.0
0.15.2 Needs review 1 0.15.2

Full list, including published versions not scanned yet: version ranges API.

Scanned versions of thread-stream

VersionVerdictFilesScanned
3.2.0 Needs review 5 Oct 4, 2026
0.15.2 Needs review 5 Oct 4, 2026

Frequently asked questions

Is thread-stream safe to use?

No confirmed malware was found in thread-stream@0.15.2, but the review flagged 6 low severity findings for risky patterns worth checking before you rely on it.

Does thread-stream contain malware?

No malware was identified in thread-stream@0.15.2 when Togoder Security scanned it on Oct 4, 2026. A new version can still introduce malicious code, so scan the exact versions in your lockfile.

How was thread-stream checked?

Togoder Security downloaded the published npm package and had an AI model read its 5 source files, looking for install scripts, credential access, network exfiltration, obfuscation, backdoors and crypto-wallet theft. The results are cached by file hash and shown here.

How do I scan thread-stream together with the rest of my dependencies?

Upload your lockfile at https://security.togoder.click/scan or call the API documented at https://security.togoder.click/api-docs. Files that have already been scanned, like the ones in thread-stream@0.15.2, cost nothing.

Related security reports