Skip to main content
MalwarePublished Updated

ecto-nightly-spirit (npm) · Malicious Code

Affects ecto-nightly-spiritSource GCVE Database

0

Malicious package : remove ecto-nightly-spirit and rotate any secrets on hosts that installed it.

Data as of 11 Jul 2026, 09:43 UTC

Classification

Malicious package

Published to npm · OSV MAL-2026-5688

What to do

Remove ecto-nightly-spirit from every project, lockfile and image that pulls it in. Treat any host that installed it as compromised: rotate the credentials, tokens and keys it could read, from a clean machine.

Affected software

ProductAffectedFixed in
npmecto-nightly-spiritAffected
  • 1.0.1 – 1.1.0
7 affected builds
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

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.

References

Community reviews

Loading reviews…