formatting-subtitlesnpm
Advisory published Updated
formatting-subtitles is a confirmed malicious npm package (MAL-2026-18184) that opens a backdoor for remote access (malicious version 1.0.2). Do not install it — remove it immediately and rotate any exposed credentials.
Malicious code in formatting-subtitles (npm)
What this malware does
package.json declares preinstall: sh./prepare.js && exit 0. prepare.js is shaped like JavaScript (ending with console.log('hello world')) but is executed by /bin/sh, which does not treat /**... */ as a comment. Inside that block, sh evaluates two $(...) command substitutions: one issues a GET to the hardcoded collector https://webhook.site/9e8c8742-3102-4716-aa8b-e150e9e84fe7/stats_1, and the other downloads https://api.github.com/gists/da04f14c93acbe9a7aef827be0a2e91c, extracts a file via jq, writes it to disk as x, and runs it with sh x. On npm install, the installer host fetches and executes arbitrary, unpinned, attacker-controlled content from a mutable GitHub Gist, and the webhook.site beacon discloses the install (and curl-visible metadata such as public IP and user-agent) to the attacker. The JS-comment-wrapping of the shell payload is a deliberate cover story so prepare.js reads as a trivial hello-world when viewed as JavaScript.
Malicious versions
Indicators of compromise (SHA-256)
Detection & response playbook
Backdoor / remote accessFind it
Search your lockfiles and build artifacts for formatting-subtitles (version 1.0.2).
If you installed it — respond
formatting-subtitles establishes remote access, so treat any host that installed it as fully compromised. Isolate the machine, remove the package, rotate all credentials it could reach, and rebuild from a trusted image rather than cleaning in place — a backdoor may have planted additional persistence.
Did it already run?
If formatting-subtitles was installed, its post-install payload may already have run. Removing the package does not undo that — check outbound connections and credential use from the install window onward.
Frequently asked questions
Campaign
References
Credits
- Amazon Inspector · finder
Detect & block this
O3 blocks formatting-subtitles-class packages before install and in CI — and if it already ran, its runtime egress monitoring catches the C2 callback and severs the channel.