MAL-2026-20279: Malicious code in retry-utils-testmetest (npm)
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (f0ca64d501c3b7cb6078a6e17deca6f52a201698a52ba20e025db67c466f8f31) The package advertises itself as a lightweight retry utility but ships no library code consistent with that purpose. binding.gyp declares a stub target with no native sources (.c/.cc/.cpp) and uses GYP command-expansion syntax (<!(node index.js...)) in an action, causing npm's automatic node-gyp rebuild to execute index.js at install time. index.js is a multi-layer obfuscated loader: a Caesar-shifted string is passed to eval; the decoded loader AES-128-GCM-decrypts an in-file blob (yielding a getBunPath helper), then AES-128-GCM-decrypts and brotli-decompresses libnative.dat into a second-stage script, writes it to a temporary file, and spawns it. Execution is routed through the Bun runtime (via getBunPath()) rather than Node, evading Node-based install-time inspection. The ~319 KB libnative.dat is named to masquerade as a native shared library but contains high-entropy AES-128-GCM ciphertext with no plaintext strings. The combination — stub binding.gyp with no native sources used only to trigger install-time execution, Caesar+AES+Brotli layered obfuscation, encrypted payload disguised as a native library, and alternate-runtime execution via Bun — is a dropper delivering attacker-controlled code to any machine that runs npm install on this package.
Affected Software
Event History
Frequently Asked Questions
When can the malicious code run?
It can run during package installation: the package uses binding.gyp command expansion to cause npm's automatic node-gyp rebuild process to execute index.js. Normal use of the advertised retry utility is not required.
Which environments are exposed?
Any environment that installs this npm package and performs the automatic node-gyp rebuild is exposed to the install-time execution path. The later payload execution is routed through the Bun runtime rather than Node.
How can I identify the suspicious package contents?
Indicators include a binding.gyp file defining a stub target with no .c, .cc, or .cpp sources; an action that invokes node index.js through GYP command expansion; an obfuscated index.js loader; and a roughly 319 KB lib_native.dat file that is actually high-entropy AES-128-GCM ciphertext rather than a native shared library.
Does the package provide the retry functionality it claims to provide?
No library code consistent with the advertised lightweight retry utility was identified. Its binding.gyp configuration is instead used to trigger install-time execution.