Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Malicious code in test-pkg-pnpm (npm)

0
Critical
Published: 07/01/2026 (07/01/2026, 20:47:19 UTC)
Source: GCVE Database
Product: test-pkg-pnpm

Description

The npm package 'test-pkg-pnpm' versions 1.0.0 through 1.0.4 contains malicious post-installation code that executes without user consent. Upon installation, it opens a GitHub page and launches the system calculator as proof of code execution. More critically, it recursively deletes node_modules directories and related files across ancestor directories and the user's home directory, and modifies package.json files by removing dependency entries. This destructive behavior compromises the integrity of the development environment and potentially the entire system. Removal of the package does not guarantee full remediation as the system may be fully compromised.

Affected software

npmghsa
test-pkg-pnpm
Affected versions
=1.0.1=1.0.4=1.0.2=1.0.0=1.0.3

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: 08/20/2026, 14:30:06 UTC

Technical Analysis

The 'test-pkg-pnpm' npm package (versions 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4) contains malicious code in its postinstall script 'node demo-clean.js' that executes automatically upon 'npm install'. This script performs two main actions: (1) it opens a GitHub repository in the default browser and spawns the OS calculator application as a demonstration of unauthenticated code execution; (2) it recursively deletes 'node_modules', '.pnpm', and related directories in all ancestor directories of the current working directory and the user's home directory using forced recursive removal, and rewrites package.json files to remove dependency entries. This behavior extends beyond the package's own directory, causing widespread filesystem damage and potential loss of project dependencies and environment stability. The malicious code also allows spawning arbitrary binaries, indicating potential for further exploitation. The package installation fully compromises the host system, requiring immediate secret/key rotation and system remediation.

Potential Impact

Installation of the affected 'test-pkg-pnpm' package versions results in unauthenticated code execution on the host system, leading to destructive deletion of node_modules directories and related files across multiple directory levels including the user's home directory. This compromises the integrity of development environments and potentially the entire system. The malicious script also modifies package.json files to remove dependencies, disrupting project configurations. The system is considered fully compromised after installation, with potential for arbitrary code execution beyond the demonstrated calculator spawn. Secrets and keys stored on the compromised system should be rotated immediately from a separate, secure device.

Defensive Guidance

There is no official patch or fix available for this malicious package. The package should be immediately removed from any affected systems. Due to the full compromise risk, all secrets and keys stored on the affected system must be rotated from a different, secure computer. Full system remediation or reimaging is recommended to ensure removal of any persistent malicious artifacts. Exercise caution when installing npm packages and verify package authenticity before installation.

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-6716
Osv Schema Version
1.7.4
Aliases
["GHSA-7grv-5j2w-4wx3"]
Ecosystems
["npm"]
Database Specific Severity
null
Cvss Version
null

Threat ID: 6a870a73acd9273b49b58a9f

Added to database: 08/20/2026, 14:08:51 UTC

Last enriched: 08/20/2026, 14:30:06 UTC

Last updated: 08/20/2026, 14:30:06 UTC

Views: 2

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