Malicious code in loading-sessions (npm)
The loading-sessions npm package impersonates the popular pino logger and contains malicious code that downloads and executes attacker-controlled JavaScript code at runtime. It fetches a remote JSON payload from a hardcoded URL, extracts a code string, and executes it with full Node.js require access, enabling arbitrary code execution. This behavior is hidden behind environment variable disguises and retries silently on failure. The package version 6.13.2 is affected. This is a critical security threat due to the potential for remote code execution.
AI Analysis
Technical Summary
The loading-sessions npm package (version 6.13.2) is a typosquatting malicious package that mimics the pino logger by exporting similar modules and filenames. When its middleware is invoked, it spawns a detached child process that base64-decodes a hardcoded URL disguised as an environment variable, fetches a JSON document from that URL, and extracts a 'cookie' string from the response. This string is executed as JavaScript code using the Function constructor with full access to Node's require function. The fetched code is attacker-controlled and mutable, allowing arbitrary code execution on the host. The package also decodes secret headers from disguised environment variables and retries fetching up to five times silently. This constitutes a classic remote code dropper hidden behind a typosquatting lure.
Potential Impact
An attacker controlling the remote JSON payload can execute arbitrary code on any system that installs and runs the loading-sessions package version 6.13.2. This can lead to full compromise of the host environment, data theft, persistence, and further malicious activities. The malicious code runs with full Node.js require access, increasing the severity of the impact.
Mitigation Recommendations
No official patch or fix is currently documented. Users should immediately stop using the loading-sessions package version 6.13.2 and remove it from their projects. Avoid installing packages that impersonate popular libraries, especially those not from trusted sources. Monitor package dependencies for typosquatting and malicious behavior. Check vendor advisories or trusted security sources for updates on remediation.
Malicious code in loading-sessions (npm)
Description
The loading-sessions npm package impersonates the popular pino logger and contains malicious code that downloads and executes attacker-controlled JavaScript code at runtime. It fetches a remote JSON payload from a hardcoded URL, extracts a code string, and executes it with full Node.js require access, enabling arbitrary code execution. This behavior is hidden behind environment variable disguises and retries silently on failure. The package version 6.13.2 is affected. This is a critical security threat due to the potential for remote code execution.
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 loading-sessions npm package (version 6.13.2) is a typosquatting malicious package that mimics the pino logger by exporting similar modules and filenames. When its middleware is invoked, it spawns a detached child process that base64-decodes a hardcoded URL disguised as an environment variable, fetches a JSON document from that URL, and extracts a 'cookie' string from the response. This string is executed as JavaScript code using the Function constructor with full access to Node's require function. The fetched code is attacker-controlled and mutable, allowing arbitrary code execution on the host. The package also decodes secret headers from disguised environment variables and retries fetching up to five times silently. This constitutes a classic remote code dropper hidden behind a typosquatting lure.
Potential Impact
An attacker controlling the remote JSON payload can execute arbitrary code on any system that installs and runs the loading-sessions package version 6.13.2. This can lead to full compromise of the host environment, data theft, persistence, and further malicious activities. The malicious code runs with full Node.js require access, increasing the severity of the impact.
Mitigation Recommendations
No official patch or fix is currently documented. Users should immediately stop using the loading-sessions package version 6.13.2 and remove it from their projects. Avoid installing packages that impersonate popular libraries, especially those not from trusted sources. Monitor package dependencies for typosquatting and malicious behavior. Check vendor advisories or trusted security sources for updates on remediation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10471
- Osv Schema Version
- 1.7.4
- Ecosystems
- ["npm"]
Threat ID: 6a55ffa768715ace432f96f2
Added to database: 07/14/2026, 09:21:43 UTC
Last enriched: 09/12/2026, 15:03:00 UTC
Last updated: 09/13/2026, 05:44:42 UTC
Views: 51
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.