Togoder security

npm package security report

tar-stream@2.2.0 security report

Risky patterns found that deserve a look.

Needs review Version 2.2.0 Files reviewed 5 Size 19.5 KB Scanned

Summary

Togoder Security scanned the npm package tar-stream@2.2.0 on Oct 4, 2026. An AI review of 5 source files produced 1 high, 1 medium, 1 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
1
high
1
medium
1
low

Findings 3

high

Path Traversal / Directory Traversal

NPS-A0E3D594C0AA

The extracted tar entry name is joined directly to '/tmp' without validation. A malicious tar file could include entries with '../' sequences or absolute paths, allowing files to be written outside the intended /tmp directory.

sandbox.js:8
medium

Unsafe Archive Extraction

NPS-A7F71E259144

Using tar-stream's extract without validation of header metadata (e.g., checking header.type for 'file' vs 'directory' vs symlink, or sanitizing header.name) can lead to symlink attacks, overwriting of arbitrary files, or denial of service via malformed archives.

sandbox.js:6
low

Dependency Typosquatting / Misleading Module

NPS-862C6F159F62

The comment indicates the variable 'pipeline' is expected to be require('stream').pipeline, but the code requires the 'pump' package. While 'pump' is a legitimate stream utility, this mismatch could indicate confusion or dependency substitution. Not inherently malicious but reduces code clarity and trust.

sandbox.js:3

Files reviewed

FileVerdictWhat the reviewer saw
sandbox.js medium The code extracts tar archives without sanitizing entry paths, enabling path traversal and potential arbitrary file writes outside /tmp.
extract.js safe This is a legitimate tar stream extractor with no malicious patterns, external network calls, credential harvesting, or dynamic code execution.
headers.js safe No malicious patterns detected
index.js safe Cleared by Jev triage; no further analysis needed
pack.js safe No malicious patterns detected; the code implements a standard tar archive packing utility without exfiltration, credential harvesting, dynamic execution, or suspicious system interactions.

Frequently asked questions

Is tar-stream safe to use?

No confirmed malware was found in tar-stream@2.2.0, but the review flagged 1 high, 1 medium, 1 low severity findings for risky patterns worth checking before you rely on it.

Does tar-stream contain malware?

No malware was identified in tar-stream@2.2.0 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 tar-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 tar-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 tar-stream@2.2.0, cost nothing.

Related security reports