# MAL-2026-5688: Malicious code in ecto-nightly-spirit (npm)


- **Type:** Malicious package
- **Package:** `ecto-nightly-spirit` (npm)
- **Published:** 12 Jun 2026
- **Also known as:** GHSA-qv45-fm3m-pqmr

## What is MAL-2026-5688?

MAL-2026-5688 is a malicious package in ecto-nightly-spirit, published on 12 Jun 2026. 

### Official description

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.

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.

## What should I do about MAL-2026-5688?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

## Fix prompt for AI coding agents

```text
MAL-2026-5688 is a malicious package: ecto-nightly-spirit (npm). Every version was published to cause harm.

Task:
1. Search this repository's dependency manifests and lockfiles for the package, including transitive dependencies.
2. If it is present, remove it, regenerate the lockfile with the project's package manager, and replace whatever it was used for.
3. List any CI runners, developer machines or containers that installed it, so their secrets can be rotated.
4. If the package is not used anywhere, say so and change nothing.

Reference: https://insights.sbomify.com/MAL-2026-5688/ (Markdown: https://insights.sbomify.com/MAL-2026-5688/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2026-5688

---
From sbomify Insights: https://insights.sbomify.com/MAL-2026-5688/
Summaries are generated and may contain mistakes; the official description above is the record.
