Malicious code in express-initial (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (a8d292a4664135ed1869f907d62fb6472839ab54a59aedb2f3a88022a0c70095) package.json declares `"postinstall": "node index.js"`, so `npm install express-initial` automatically runs the package's main script. index.js is heavily obfuscated (obfuscator.io-style 317-entry RC4-encoded string array, base64 decoder, array-rotation self-shuffle, control-flow flattening) which hides the destination URL, AES key material, and command strings from any plain-text inspection. At runtime the script imports http/https, fs, path, os, crypto, and child_process, performs an HTTPS GET against a hard-coded remote host, splits the response on ':' into IV and ciphertext, decrypts via `crypto.createDecipheriv('aes-256-...', <sha256-derived key>, Buffer.from(iv,'base64'))`, writes the decrypted bytes into `path.join(os.tmpdir(), <name>)` with flag 'w+', and immediately invokes the dropped file via `child_process.exec`/`execFile` with `windowsHide: true`. This is a fetch-decrypt-and-execute dropper firing on default install. The package name also leverages the popular `express` framework while shipping empty author/description/repository metadata and a generic README that itself notes the script is obfuscated — consistent with a deliberate supply-chain lure rather than a legitimate helper. ## Source: ghsa-malware (7e5efd40dc0c1b6d6087636366132ffd18b77da665b9984fddb61c9bb72a80de) 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 'express-initial' npm package (versions 12.1.9 and 12.1.10) includes a postinstall script that runs an obfuscated JavaScript file (index.js) upon installation. This script imports core Node.js modules and performs an HTTPS GET request to a hard-coded remote server to retrieve an encrypted payload. It decrypts this payload using AES-256 with a SHA-256 derived key and an initialization vector extracted from the response. The decrypted payload is saved to a temporary file and executed with hidden windows, enabling arbitrary code execution on the host. The package's empty author and repository metadata, combined with the obfuscated code, strongly indicate malicious intent designed to compromise systems via supply-chain infection.
Potential Impact
Any system that installs or runs the affected versions of the 'express-initial' package is at high risk of full compromise. The malicious payload executes arbitrary code with the privileges of the installing user, potentially allowing attackers to control the system, steal secrets, and persist beyond package removal. Secrets and keys stored on the compromised system cannot be trusted and must be rotated from a secure environment. Removal of the package alone does not guarantee eradication of the malware or attacker persistence.
Mitigation Recommendations
No official patch or fix is currently available for this malicious package. Immediate removal of the 'express-initial' package versions 12.1.9 and 12.1.10 is recommended. Systems with this package installed should be treated as fully compromised; all secrets and credentials stored on these systems must be rotated from a different, secure machine. Conduct a thorough incident response to identify and remediate any additional malware or persistence mechanisms. Avoid installing packages with suspicious or missing metadata and verify package authenticity before installation.
Malicious code in express-initial (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (a8d292a4664135ed1869f907d62fb6472839ab54a59aedb2f3a88022a0c70095) package.json declares `"postinstall": "node index.js"`, so `npm install express-initial` automatically runs the package's main script. index.js is heavily obfuscated (obfuscator.io-style 317-entry RC4-encoded string array, base64 decoder, array-rotation self-shuffle, control-flow flattening) which hides the destination URL, AES key material, and command strings from any plain-text inspection. At runtime the script imports http/https, fs, path, os, crypto, and child_process, performs an HTTPS GET against a hard-coded remote host, splits the response on ':' into IV and ciphertext, decrypts via `crypto.createDecipheriv('aes-256-...', <sha256-derived key>, Buffer.from(iv,'base64'))`, writes the decrypted bytes into `path.join(os.tmpdir(), <name>)` with flag 'w+', and immediately invokes the dropped file via `child_process.exec`/`execFile` with `windowsHide: true`. This is a fetch-decrypt-and-execute dropper firing on default install. The package name also leverages the popular `express` framework while shipping empty author/description/repository metadata and a generic README that itself notes the script is obfuscated — consistent with a deliberate supply-chain lure rather than a legitimate helper. ## Source: ghsa-malware (7e5efd40dc0c1b6d6087636366132ffd18b77da665b9984fddb61c9bb72a80de) 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 'express-initial' npm package (versions 12.1.9 and 12.1.10) includes a postinstall script that runs an obfuscated JavaScript file (index.js) upon installation. This script imports core Node.js modules and performs an HTTPS GET request to a hard-coded remote server to retrieve an encrypted payload. It decrypts this payload using AES-256 with a SHA-256 derived key and an initialization vector extracted from the response. The decrypted payload is saved to a temporary file and executed with hidden windows, enabling arbitrary code execution on the host. The package's empty author and repository metadata, combined with the obfuscated code, strongly indicate malicious intent designed to compromise systems via supply-chain infection.
Potential Impact
Any system that installs or runs the affected versions of the 'express-initial' package is at high risk of full compromise. The malicious payload executes arbitrary code with the privileges of the installing user, potentially allowing attackers to control the system, steal secrets, and persist beyond package removal. Secrets and keys stored on the compromised system cannot be trusted and must be rotated from a secure environment. Removal of the package alone does not guarantee eradication of the malware or attacker persistence.
Mitigation Recommendations
No official patch or fix is currently available for this malicious package. Immediate removal of the 'express-initial' package versions 12.1.9 and 12.1.10 is recommended. Systems with this package installed should be treated as fully compromised; all secrets and credentials stored on these systems must be rotated from a different, secure machine. Conduct a thorough incident response to identify and remediate any additional malware or persistence mechanisms. Avoid installing packages with suspicious or missing metadata and verify package authenticity before installation.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-6543
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-fh43-48vc-c9r9"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a4c341727e9c797195f80f0
Added to database: 07/06/2026, 23:02:47 UTC
Last enriched: 07/07/2026, 00:23:11 UTC
Last updated: 07/18/2026, 20:01:52 UTC
Views: 8
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.