Skip to main content

Malicious code in loading-sessions (npm)

0
Critical
Published: 07/13/2026 (07/13/2026, 18:54:09 UTC)
Source: GCVE Database
Product: loading-sessions

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

npmghsa
loading-sessions
Affected versions
=6.13.2

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

AILast updated: 09/12/2026, 15:03:00 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses