Malicious code in encrypt-string-safe (npm)
The npm package 'encrypt-string-safe' version 2.2.0 contains malicious code that fetches and executes attacker-controlled JavaScript from a lookalike domain over unencrypted HTTP. The package's index.js is heavily obfuscated to conceal this behavior. Any use of the package's documented API results in remote code execution within the caller's process.
AI Analysis
Technical Summary
The 'encrypt-string-safe' npm package version 2.2.0 includes heavily obfuscated code that routes all exported API calls through an internal function which fetches JavaScript from a malicious third-party host (http://npm.jsdelivree.com/encrypt-string-admin-core/core.js). This domain mimics the legitimate jsdelivr CDN but uses a different TLD (.com vs .net). The fetched script is executed dynamically via 'new Function', enabling remote code execution. The transport uses plain HTTP without TLS, and the only integrity check is a simple marker-string search, providing no real security. This design allows an attacker to control code execution in any environment that imports and uses this package version.
Potential Impact
Any application or environment that installs and invokes the documented API of 'encrypt-string-safe' version 2.2.0 is vulnerable to remote code execution by an attacker controlling the third-party host. This can lead to full compromise of the affected system or environment. The obfuscation and use of a lookalike domain make detection difficult.
Mitigation Recommendations
No official patch or fix is currently documented. Users should immediately cease using 'encrypt-string-safe' version 2.2.0 and remove it from their projects. Avoid executing code from untrusted or mutable third-party hosts, especially over unencrypted HTTP. Monitor for any updates from the package maintainers or security advisories for remediation guidance. Patch status is not yet confirmed — check the vendor advisory or official sources for current remediation guidance.
Malicious code in encrypt-string-safe (npm)
Description
The npm package 'encrypt-string-safe' version 2.2.0 contains malicious code that fetches and executes attacker-controlled JavaScript from a lookalike domain over unencrypted HTTP. The package's index.js is heavily obfuscated to conceal this behavior. Any use of the package's documented API results in remote code execution within the caller's process.
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 'encrypt-string-safe' npm package version 2.2.0 includes heavily obfuscated code that routes all exported API calls through an internal function which fetches JavaScript from a malicious third-party host (http://npm.jsdelivree.com/encrypt-string-admin-core/core.js). This domain mimics the legitimate jsdelivr CDN but uses a different TLD (.com vs .net). The fetched script is executed dynamically via 'new Function', enabling remote code execution. The transport uses plain HTTP without TLS, and the only integrity check is a simple marker-string search, providing no real security. This design allows an attacker to control code execution in any environment that imports and uses this package version.
Potential Impact
Any application or environment that installs and invokes the documented API of 'encrypt-string-safe' version 2.2.0 is vulnerable to remote code execution by an attacker controlling the third-party host. This can lead to full compromise of the affected system or environment. The obfuscation and use of a lookalike domain make detection difficult.
Mitigation Recommendations
No official patch or fix is currently documented. Users should immediately cease using 'encrypt-string-safe' version 2.2.0 and remove it from their projects. Avoid executing code from untrusted or mutable third-party hosts, especially over unencrypted HTTP. Monitor for any updates from the package maintainers or security advisories for remediation guidance. Patch status is not yet confirmed — check the vendor advisory or official sources for current remediation guidance.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-13342
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a73851fbf8831d5394ef863
Added to database: 08/05/2026, 18:46:55 UTC
Last enriched: 08/19/2026, 16:09:09 UTC
Last updated: 09/07/2026, 22:10:23 UTC
Views: 16
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.