Malicious code in webpack-patch (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (d0f5ce3525e99528190ba5217a777184e302d46050fc23bef173de6fda240eba) Package impersonates the webpack ecosystem but is unrelated to webpack. When the exported middleware is invoked, index.js spawns a detached `node lib/caller.js` child. caller.js fetches https://jsonkeeper.com/b/XRGF3 via axios and passes the response's `.cookie` field to `new Function.constructor('require', s)(require)`, executing attacker-controlled JavaScript with full Node privileges and a retry loop. The C2 URL and HTTP header name/value are stored as base64 strings under sham `process.env` keys (`DEV_API_KEY` base64-decodes to `https://jsonkeeper.com/b/XRGF3`); a sibling const.js variant points at `https://jsonkeeper.com/b/4NAKK`, providing pivot URLs if the primary paste is removed. jsonkeeper.com is an anonymous mutable paste host — whoever controls the paste controls arbitrary code execution on every consumer that loads webpack-patch and exercises its API. The package.json description is generic boilerplate copied from an unrelated security policy, and the `main` is a fake pino-style middleware whose only meaningful effect is launching the dropper. ## Source: ghsa-malware (c0fa02eb8a58fb15c7b71d6ab94306801f07b0a14ff28abb18e83a5063fce9ea) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
AI Analysis
Technical Summary
The 'webpack-patch' npm package (version 1.1.7) is a malicious package unrelated to the legitimate webpack project. Its main module spawns a detached Node.js child process that fetches JavaScript code from a mutable anonymous paste host (jsonkeeper.com). The fetched code is executed dynamically using the Function constructor, granting the attacker full control over the host system. The package uses base64-encoded environment variable keys to hide the command-and-control URLs. If the primary paste is removed, secondary pivot URLs are available to maintain persistence. The package.json metadata is deceptive and does not reflect the package's true intent. Due to the arbitrary code execution capability, any system running this package is fully compromised.
Potential Impact
Systems that have installed or run 'webpack-patch' version 1.1.7 are subject to arbitrary remote code execution with full Node.js privileges. This allows attackers to execute any code, potentially leading to complete system compromise, data theft, or further malware deployment. All secrets and keys stored on the compromised system should be considered exposed and require immediate rotation. Removal of the package alone does not guarantee eradication of the attacker presence.
Mitigation Recommendations
No official patch or fix is available for this malicious package. The recommended mitigation is immediate removal of 'webpack-patch' version 1.1.7 from all systems. Additionally, consider all affected systems fully compromised: rotate all secrets and keys from a secure, unaffected environment. Conduct a thorough incident response to identify and remediate any persistent malicious activity resulting from this package's execution.
Malicious code in webpack-patch (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (d0f5ce3525e99528190ba5217a777184e302d46050fc23bef173de6fda240eba) Package impersonates the webpack ecosystem but is unrelated to webpack. When the exported middleware is invoked, index.js spawns a detached `node lib/caller.js` child. caller.js fetches https://jsonkeeper.com/b/XRGF3 via axios and passes the response's `.cookie` field to `new Function.constructor('require', s)(require)`, executing attacker-controlled JavaScript with full Node privileges and a retry loop. The C2 URL and HTTP header name/value are stored as base64 strings under sham `process.env` keys (`DEV_API_KEY` base64-decodes to `https://jsonkeeper.com/b/XRGF3`); a sibling const.js variant points at `https://jsonkeeper.com/b/4NAKK`, providing pivot URLs if the primary paste is removed. jsonkeeper.com is an anonymous mutable paste host — whoever controls the paste controls arbitrary code execution on every consumer that loads webpack-patch and exercises its API. The package.json description is generic boilerplate copied from an unrelated security policy, and the `main` is a fake pino-style middleware whose only meaningful effect is launching the dropper. ## Source: ghsa-malware (c0fa02eb8a58fb15c7b71d6ab94306801f07b0a14ff28abb18e83a5063fce9ea) Any computer that has this package installed or running should be considered fully compromised. All secrets and keys stored on that computer should be rotated immediately from a different computer. The package should be removed, but as full control of the computer may have been given to an outside entity, there is no guarantee that removing the package will remove all malicious software resulting from installing it.
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 'webpack-patch' npm package (version 1.1.7) is a malicious package unrelated to the legitimate webpack project. Its main module spawns a detached Node.js child process that fetches JavaScript code from a mutable anonymous paste host (jsonkeeper.com). The fetched code is executed dynamically using the Function constructor, granting the attacker full control over the host system. The package uses base64-encoded environment variable keys to hide the command-and-control URLs. If the primary paste is removed, secondary pivot URLs are available to maintain persistence. The package.json metadata is deceptive and does not reflect the package's true intent. Due to the arbitrary code execution capability, any system running this package is fully compromised.
Potential Impact
Systems that have installed or run 'webpack-patch' version 1.1.7 are subject to arbitrary remote code execution with full Node.js privileges. This allows attackers to execute any code, potentially leading to complete system compromise, data theft, or further malware deployment. All secrets and keys stored on the compromised system should be considered exposed and require immediate rotation. Removal of the package alone does not guarantee eradication of the attacker presence.
Mitigation Recommendations
No official patch or fix is available for this malicious package. The recommended mitigation is immediate removal of 'webpack-patch' version 1.1.7 from all systems. Additionally, consider all affected systems fully compromised: rotate all secrets and keys from a secure, unaffected environment. Conduct a thorough incident response to identify and remediate any persistent malicious activity resulting from this package's execution.
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"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4c342c27e9c797195fa492
Added to database: 07/06/2026, 23:03:08 UTC
Last enriched: 07/07/2026, 00:07:31 UTC
Last updated: 07/28/2026, 10:00:02 UTC
Views: 14
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.
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.