Malicious code in ecto-nightly-spirit (npm)
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (5dea0702101217f4a918a23191023bbd9e7d3b5478028bb0868341a574526e97) On `npm install`, postinstall.js executes unconditionally and performs three installer-harming actions. (1) It enumerates every key/value pair in `process.env` and scans for HTB{...} flag patterns (postinstall.js:42-45). (2) It reads a hardcoded list of absolute filesystem paths (/flag.txt, /root/flag.txt, /app/flag.txt, etc.) and shells out via `/bin/sh -c 'grep -Rao 'HTB{[^}]*}' /app /tmp /root /home /opt /usr/src'` to recursively scan the installer's filesystem (postinstall.js:65). (3) It HTTP-PUTs the discovered string (or a `NOFLAG uid=... cwd=...` fallback containing host identifiers) to the hardcoded bare-IP endpoint `http://154.57.164.70:30569/api/modules/ECT-472839` over plain HTTP. Additionally, postinstall.js:13-25 /:104-109 writes attacker-chosen content into common web document roots (/usr/share/nginx/html/flag.txt, /var/www/html/flag.txt, /app/public/flag.txt, etc.), creating a public leak channel on any installer machine that also serves a webroot. Although the package self-describes as a 'CTF payload for verdaccio supply-chain testing', publishing it to the public npm registry exposes any installer (CI runner, developer machine, container build) to environment scraping, filesystem search, host-info exfiltration, and webroot poisoning. ## Source: ghsa-malware (6d71f699510b488ccfcbffb3506c7201419f7229c5aa2544aae21845b8c56081) 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 ecto-nightly-spirit package (versions 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, and 1.1.0) contains a postinstall.js script that executes unconditionally upon npm install. This script enumerates all environment variables searching for HTB{...} flag patterns, recursively scans predefined filesystem paths for similar patterns using shell commands, and sends any found data or fallback host identifiers to a hardcoded IP endpoint via HTTP PUT. Additionally, it writes attacker-chosen content into common web server document roots, creating a public leak channel if the host serves web content. The package's presence on any machine (developer, CI, container) results in environment scraping, filesystem search, host information exfiltration, and webroot poisoning. The package is effectively a malicious supply-chain payload.
Potential Impact
Systems installing this package are fully compromised as the malicious script can exfiltrate environment secrets, filesystem data, and host identifiers to an attacker-controlled server. It also creates publicly accessible files in web document roots, potentially leaking sensitive information. Any secrets or keys on the compromised system should be considered exposed and rotated immediately. Removing the package does not guarantee removal of all malicious artifacts or backdoors.
Mitigation Recommendations
No official patch or fix is available. The package should be removed immediately from all systems. All secrets and keys stored on affected machines must be rotated from a separate, uncompromised system. Due to the full compromise risk, affected hosts should be thoroughly audited and potentially rebuilt. Avoid installing this package or any untrusted npm packages without verification.
Malicious code in ecto-nightly-spirit (npm)
Description
--- _-= Per source details. Do not edit below this line.=-_ ## Source: amazon-inspector (5dea0702101217f4a918a23191023bbd9e7d3b5478028bb0868341a574526e97) On `npm install`, postinstall.js executes unconditionally and performs three installer-harming actions. (1) It enumerates every key/value pair in `process.env` and scans for HTB{...} flag patterns (postinstall.js:42-45). (2) It reads a hardcoded list of absolute filesystem paths (/flag.txt, /root/flag.txt, /app/flag.txt, etc.) and shells out via `/bin/sh -c 'grep -Rao 'HTB{[^}]*}' /app /tmp /root /home /opt /usr/src'` to recursively scan the installer's filesystem (postinstall.js:65). (3) It HTTP-PUTs the discovered string (or a `NOFLAG uid=... cwd=...` fallback containing host identifiers) to the hardcoded bare-IP endpoint `http://154.57.164.70:30569/api/modules/ECT-472839` over plain HTTP. Additionally, postinstall.js:13-25 /:104-109 writes attacker-chosen content into common web document roots (/usr/share/nginx/html/flag.txt, /var/www/html/flag.txt, /app/public/flag.txt, etc.), creating a public leak channel on any installer machine that also serves a webroot. Although the package self-describes as a 'CTF payload for verdaccio supply-chain testing', publishing it to the public npm registry exposes any installer (CI runner, developer machine, container build) to environment scraping, filesystem search, host-info exfiltration, and webroot poisoning. ## Source: ghsa-malware (6d71f699510b488ccfcbffb3506c7201419f7229c5aa2544aae21845b8c56081) 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 ecto-nightly-spirit package (versions 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, and 1.1.0) contains a postinstall.js script that executes unconditionally upon npm install. This script enumerates all environment variables searching for HTB{...} flag patterns, recursively scans predefined filesystem paths for similar patterns using shell commands, and sends any found data or fallback host identifiers to a hardcoded IP endpoint via HTTP PUT. Additionally, it writes attacker-chosen content into common web server document roots, creating a public leak channel if the host serves web content. The package's presence on any machine (developer, CI, container) results in environment scraping, filesystem search, host information exfiltration, and webroot poisoning. The package is effectively a malicious supply-chain payload.
Potential Impact
Systems installing this package are fully compromised as the malicious script can exfiltrate environment secrets, filesystem data, and host identifiers to an attacker-controlled server. It also creates publicly accessible files in web document roots, potentially leaking sensitive information. Any secrets or keys on the compromised system should be considered exposed and rotated immediately. Removing the package does not guarantee removal of all malicious artifacts or backdoors.
Mitigation Recommendations
No official patch or fix is available. The package should be removed immediately from all systems. All secrets and keys stored on affected machines must be rotated from a separate, uncompromised system. Due to the full compromise risk, affected hosts should be thoroughly audited and potentially rebuilt. Avoid installing this package or any untrusted npm packages without verification.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-5688
- Osv Schema Version
- 1.7.4
- Aliases
- ["GHSA-qv45-fm3m-pqmr"]
- Ecosystems
- ["npm"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a50ba5c68715ace4357efd4
Added to database: 07/10/2026, 09:24:44 UTC
Last enriched: 07/10/2026, 09:44:39 UTC
Last updated: 07/19/2026, 12:08:52 UTC
Views: 4
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.