MAL-2026-21082: Malicious code in nocuhel (npm)
--- -= Per source details. Do not edit below this line.=-
Source: amazon-inspector (a3ca29b99714d4efa3fc100dc78d29b2a3fcc524a42f217720a2ee4bd8b35cf8) The nocuhel tarball bundles a nested package directory (payload/wiwusen) whose package.json declares a prepare lifecycle script running node prep.js. prep.js writes a marker file into the installer's $HOME and invokes /bin/sh -c 'id >...', demonstrating arbitrary command execution during npm install. The outer manifest declares bundleDependencies:["decoy"] while the nested directory is named wiwusen - a packaging mismatch that smuggles the lifecycle-carrying sub-package past casual manifest review. The behavior fires automatically on default install via the nested prepare hook; the shelled-out id capture and marker drop in $HOME are a classic install-time ACE proof-of-concept with no legitimate build or runtime purpose.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this package's behavior?
Any environment that runs npm install for nocuhel is exposed, because the nested package's prepare lifecycle hook runs automatically during the default installation process. This can include developer workstations and CI systems that install the package.
What does the install-time code do?
The nested prepare script runs node prep.js, which writes a marker file in the installer's $HOME and uses /bin/sh -c to run id and redirect its output. This demonstrates that arbitrary shell commands can execute with the permissions of the account performing the installation.
Does avoiding use of the package at runtime prevent execution?
No. The described behavior occurs during npm install through a lifecycle hook, so merely installing the package is sufficient; application runtime use is not required.
What packaging detail may make this harder to spot during review?
The outer manifest declares bundleDependencies containing decoy, but the bundled nested directory is named payload/wiwusen. The lifecycle script is declared in that nested package, creating a mismatch between the manifest declaration and the included package content.