MAL-2026-20259: Malicious code in webhook-easy (npm)
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (122a9d3bb53594cc075ddd718968a7eb74486420ded7ce82eebb810021410023) On require('webhook-easy'), src/models.js runs a top-level IIFE that fetches a base64-concealed URL (decoded host: www.jsonkeeper.com, path /b/OTNIY), AES-256-CBC decrypts the response using a password hardcoded in the module, and passes the resulting string to eval(). The destination URL, an auth header name, and a header value in src/monitor.js are stored as base64 literals and decoded at runtime, concealing the destination from casual review. Because models.js is reached transitively from the package main (src/index.js), any consumer that requires the package executes whatever JavaScript the paste host currently serves — a mutable, third-party, attacker-controlled location. package.json also declares registry dependencies named 'crypto' ^1.0.1 and 'fs' ^0.0.1-security, which shadow Node core module names and pull unrelated registry packages into the install. The behavior has no relationship to the package's stated purpose (webhook signing) and is the canonical remote-execution dropper shape.
Affected Software
Event History
Frequently Asked Questions
What actions trigger the malicious behavior?
Requiring the package triggers it. The package main loads src/index.js, which reaches src/models.js; that file runs a top-level function that retrieves, decrypts, and evaluates JavaScript from a remote location.
What does an attacker need to exploit this in an environment using the package?
An attacker controlling the content served by the referenced third-party paste host can change the JavaScript that consuming applications execute when they require the package. No application-specific webhook interaction is described as necessary.
Are applications affected even if they do not actively use the package's webhook-signing functions?
Yes. The behavior occurs during module loading through require('webhook-easy'), before a consumer needs to call any package functionality.
What additional supply-chain concern exists during installation?
The package declares registry dependencies named crypto and fs, which shadow Node core module names and cause unrelated registry packages to be installed. This adds dependencies beyond the expected built-in Node modules.