Skip to main content

Malicious code in webpack-patch (npm)

0
Critical
Published: 06/11/2026 (06/11/2026, 05:06:30 UTC)
Source: GCVE Database
Product: webpack-patch

Description

The npm package 'webpack-patch' (version 1.1.7) impersonates the webpack ecosystem but is unrelated and contains malicious code. When its middleware is invoked, it spawns a detached child process that fetches attacker-controlled JavaScript from an anonymous paste service and executes it with full Node.js privileges. This allows arbitrary code execution on any system using the package. The package's metadata is misleading, and the malicious code includes retry loops and pivot URLs to maintain persistence. Systems with this package installed should be considered fully compromised.

Affected software

npmghsa
webpack-patch
Affected versions
=1.1.7

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, 20:46:29 UTC

Technical Analysis

The 'webpack-patch' npm package (version 1.1.7) is a malicious package impersonating the webpack ecosystem. Its main module spawns a detached child Node.js process that fetches JavaScript code from an anonymous mutable paste host (jsonkeeper.com). The fetched code is executed dynamically using the Function constructor, granting attacker-controlled code full Node.js privileges. The package uses base64-encoded environment variable keys to store command-and-control URLs and HTTP header information. The malicious payload includes retry mechanisms and fallback URLs to maintain persistence if the primary paste is removed. The package.json metadata is generic and misleading, designed to disguise the malicious intent. Any system running this package is at risk of full compromise.

Potential Impact

Systems with 'webpack-patch' version 1.1.7 installed and executing its middleware are subject to arbitrary remote code execution with full Node.js privileges. This can lead to complete system compromise, including unauthorized access to secrets and keys. The attacker can maintain persistence through retry loops and alternate command-and-control URLs. The compromise is severe enough that all secrets and keys on the affected system should be considered exposed and rotated immediately. Removal of the package alone may not eliminate all malicious artifacts.

Mitigation Recommendations

There is no official patch or fix available for this malicious package. The recommended mitigation is immediate removal of the 'webpack-patch' package version 1.1.7 from all affected systems. Additionally, all secrets and keys stored on compromised systems should be rotated from a secure, unaffected environment. Due to the high risk of full system compromise, a thorough security assessment and remediation process should be conducted. Monitor for any signs of persistence or additional malicious activity resulting from the package 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-5581
Osv Schema Version
1.7.4
Aliases
["GHSA-3hxr-3hxr-pqq4"]
Ecosystems
["npm"]

Threat ID: 6a4c342c27e9c797195fa492

Added to database: 07/06/2026, 23:03:08 UTC

Last enriched: 09/12/2026, 20:46:29 UTC

Last updated: 09/12/2026, 20:46:29 UTC

Views: 33

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