Malicious code in @osmura/treeify (npm)
The npm package @osmura/treeify versions 1.1.0, 1.1.2, and 1.1.3 contains malicious code appended to the legitimate treeify library code. This injected code executes upon requiring the package, spawning a detached Node.js process that fetches and decrypts attacker-controlled payloads from remote servers, then executes them on the victim's machine. The malicious code uses obfuscation techniques and fallback command-and-control URLs to ensure persistence and stealth. This results in arbitrary code execution on any system importing this package version.
AI Analysis
Technical Summary
The @osmura/treeify npm package is a repackaged version of the legitimate treeify library with appended obfuscated malicious code. Upon import, it spawns a detached Node.js process that makes HTTPS requests to attacker-controlled hosts, decrypts the received payload using AES-256-GCM with keys derived from embedded data, writes the payload to a temporary directory, and executes it. Two independent injected code blocks provide fallback C2 URLs. This behavior causes automatic download and execution of attacker-controlled code on any system that requires this package.
Potential Impact
Any system that installs and requires @osmura/treeify versions 1.1.0, 1.1.2, or 1.1.3 will execute attacker-controlled code with the privileges of the importing process. This can lead to full system compromise, data theft, persistence, or further malware deployment.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately stop using @osmura/treeify versions 1.1.0, 1.1.2, and 1.1.3. Remove these versions from all projects and dependency trees. Replace with the legitimate treeify package from the original author or a trusted source. Monitor for any signs of compromise on systems that imported these versions. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Malicious code in @osmura/treeify (npm)
Description
The npm package @osmura/treeify versions 1.1.0, 1.1.2, and 1.1.3 contains malicious code appended to the legitimate treeify library code. This injected code executes upon requiring the package, spawning a detached Node.js process that fetches and decrypts attacker-controlled payloads from remote servers, then executes them on the victim's machine. The malicious code uses obfuscation techniques and fallback command-and-control URLs to ensure persistence and stealth. This results in arbitrary code execution on any system importing this package version.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The @osmura/treeify npm package is a repackaged version of the legitimate treeify library with appended obfuscated malicious code. Upon import, it spawns a detached Node.js process that makes HTTPS requests to attacker-controlled hosts, decrypts the received payload using AES-256-GCM with keys derived from embedded data, writes the payload to a temporary directory, and executes it. Two independent injected code blocks provide fallback C2 URLs. This behavior causes automatic download and execution of attacker-controlled code on any system that requires this package.
Potential Impact
Any system that installs and requires @osmura/treeify versions 1.1.0, 1.1.2, or 1.1.3 will execute attacker-controlled code with the privileges of the importing process. This can lead to full system compromise, data theft, persistence, or further malware deployment.
Mitigation Recommendations
No official patch or remediation is currently documented. Users should immediately stop using @osmura/treeify versions 1.1.0, 1.1.2, and 1.1.3. Remove these versions from all projects and dependency trees. Replace with the legitimate treeify package from the original author or a trusted source. Monitor for any signs of compromise on systems that imported these versions. Patch status is not yet confirmed — check the vendor advisory or trusted security sources for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6542
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4f6c4168715ace43158b9e
Added to database: 07/09/2026, 09:39:13 UTC
Last enriched: 07/09/2026, 09:55:20 UTC
Last updated: 07/31/2026, 15:12:50 UTC
Views: 15
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.