Malicious code in type-context (npm)
The npm package 'type-context' versions 3.2.7, 3.2.8, 3.2.9, and 3.2.11 contains malicious code that executes attacker-controlled JavaScript on the host. When imported and used, it runs a detached Node child process that fetches code from remote paste-style services and executes it with full module loader privileges. This allows an attacker to gain full control over the compromised system. Removal of the package does not guarantee elimination of all malicious software installed via this backdoor. Immediate secret and key rotation is recommended for affected systems.
AI Analysis
Technical Summary
The 'type-context' npm package masquerades as a logger but contains malicious code that executes arbitrary JavaScript fetched from hardcoded remote endpoints. Specifically, upon invocation of its middleware factory, it spawns a detached Node.js child process running 'lib/caller.js', which retrieves JSON data from an attacker-controlled URL. It extracts a 'cookie' field from the response and executes it as JavaScript code using the Function constructor with the Node 'require' function injected, granting full module loading capabilities. The package also uses obfuscated fallback URLs encoded in environment variables to evade detection. The remote code is mutable and hosted on anonymous paste services, enabling attackers to execute any code on the host machine. This results in a full compromise of any system running this package version.
Potential Impact
Systems with the affected 'type-context' package versions installed are fully compromised, as the package executes attacker-controlled code with full Node.js module privileges. This can lead to unauthorized access, data theft, persistence of malicious software, and complete loss of system integrity. Secrets and keys stored on compromised systems are at risk and should be considered exposed.
Mitigation Recommendations
No official patch or fix is currently documented. Immediate removal of the 'type-context' package versions 3.2.7, 3.2.8, 3.2.9, and 3.2.11 is strongly recommended. Because the package grants full control to attackers, assume the system is fully compromised and perform a comprehensive incident response, including secret and key rotation from a secure environment. Monitor for any persistence mechanisms or additional malware. Patch status is not yet confirmed — check the vendor advisory or trusted sources for updates.
Malicious code in type-context (npm)
Description
The npm package 'type-context' versions 3.2.7, 3.2.8, 3.2.9, and 3.2.11 contains malicious code that executes attacker-controlled JavaScript on the host. When imported and used, it runs a detached Node child process that fetches code from remote paste-style services and executes it with full module loader privileges. This allows an attacker to gain full control over the compromised system. Removal of the package does not guarantee elimination of all malicious software installed via this backdoor. Immediate secret and key rotation is recommended for affected systems.
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 'type-context' npm package masquerades as a logger but contains malicious code that executes arbitrary JavaScript fetched from hardcoded remote endpoints. Specifically, upon invocation of its middleware factory, it spawns a detached Node.js child process running 'lib/caller.js', which retrieves JSON data from an attacker-controlled URL. It extracts a 'cookie' field from the response and executes it as JavaScript code using the Function constructor with the Node 'require' function injected, granting full module loading capabilities. The package also uses obfuscated fallback URLs encoded in environment variables to evade detection. The remote code is mutable and hosted on anonymous paste services, enabling attackers to execute any code on the host machine. This results in a full compromise of any system running this package version.
Potential Impact
Systems with the affected 'type-context' package versions installed are fully compromised, as the package executes attacker-controlled code with full Node.js module privileges. This can lead to unauthorized access, data theft, persistence of malicious software, and complete loss of system integrity. Secrets and keys stored on compromised systems are at risk and should be considered exposed.
Mitigation Recommendations
No official patch or fix is currently documented. Immediate removal of the 'type-context' package versions 3.2.7, 3.2.8, 3.2.9, and 3.2.11 is strongly recommended. Because the package grants full control to attackers, assume the system is fully compromised and perform a comprehensive incident response, including secret and key rotation from a secure environment. Monitor for any persistence mechanisms or additional malware. Patch status is not yet confirmed — check the vendor advisory or trusted sources for updates.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10440
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-rw86-h32r-9xf5"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a55ffa768715ace432f96f5
Added to database: 07/14/2026, 09:21:43 UTC
Last enriched: 07/14/2026, 09:54:47 UTC
Last updated: 07/24/2026, 17:05:54 UTC
Views: 6
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.
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.