Skip to main content
MalwarePublished Updated

webpack-patch (npm) · Malicious Code

Affects webpack-patchSource GCVE Database

0

Malicious package : remove webpack-patch and rotate any secrets on hosts that installed it.

Data as of 12 Sep 2026, 20:46 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-5581

What to do

Remove webpack-patch from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npmwebpack-patchAffected
  • =1.1.7
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

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.

References

Community reviews

Loading reviews…