@osmura/treeify
converts a JS object into a nice and readable tree structure for the console
This report shows the evidence for @osmura/treeify@1.1.3. 3 of 3 known versions are blocked or flagged. See all versions.
OpenSSF/OSV Malicious Advisory
imported 4mo ago · by OpenSSF/OSVOpenSSF/OSV advisory MAL-2026-6542 confirms this npm version as malicious.
Advisory
MAL-2026-6542
Source
OpenSSF Malicious Packages via OSV
Summary
Malicious code in @osmura/treeify (npm)
Details
The package republishes the upstream `treeify` library (Luke Plaster, repo notatestuser/treeify) verbatim under the unrelated `@osmura` scope, preserving the original package.json author/repository/keywords/README as cover. Appended to `treeify.js` (starting around line 115) is ~93KB of obfuscator.io-style code (RC4+base64 string-array, `while(!![])` control-flow flattening) that runs whenever a consumer does `require('@osmura/treeify')`. The injected code re-spawns Node detached with a marker environment variable, issues an HTTPS request to a hostname encoded inside the obfuscated string array, AES-256-GCM-decrypts the response using a key XOR-derived from four embedded base64 buffers, writes the plaintext payload into `os.tmpdir()/<name>-<pid>/`, and spawns it via `child_process.spawn(..., {stdio:..., windowsHide: true, detached: true})` — see treeify.js:116 `var aM = at[ba(0x19,...)](aK, aL, {'stdio':..., 'windowsHide':!![], 'detached':!![]})` and the corresponding `https.request({method: 'GET', hostname: aG[...], timeout: 60000},...)` call. Two independent injected IIFEs implement the same dropper with separate encoded URL pools, providing fallback C2. Any installer that requires this package fetches and executes attacker-controlled code on their machine at import time.
Source & flagged code
0 flagged · loading sourceNo flagged code excerpts are attached to this scan.
Findings
1 High
HighOsv Malicious Advisory
Affected versions and remediation
This report applies to @osmura/treeify@1.1.3.
The same advisory and Firewall decision cover 3 recorded versions
1.1.2, 1.1.3, 1.1.0
The versions list below shows the verdict for each recorded version.
- Avoid installing @osmura/treeify@1.1.3. Remove it from direct dependencies and check your lockfile for transitive copies.
- Choose an independently verified alternative or release. This report does not establish that other versions are safe.
- If this version ran, investigate the affected machine and build environment. Rotate credentials it could access and rebuild from a trusted environment.
Evidence last updated: .
Source advisory published: .
This report uses published external intelligence. The advisory does not provide a separate source-code analysis for each listed version.
Think this verdict is wrong? Dispute it on GitHub or read how reports are produced.