cvelo
P2 · HighMalware

Malicious code in formatting-subtitles (npm)

  • MAL-2026-18184

Description

The package publishes as formatting-subtitles but its README, bin entry, and sole dependency identify as unicode-title-normalizer, a facade used to lure installs. The tarball ships x.js, a JavaScript/shell polyglot: when read as JavaScript it prints a hello message, but when executed by sh the `/**... */` header is interpreted as shell containing command substitutions that beacon to https://webhook.site/9e8c8742-3102-4716-aa8b-e150e9e84fe7/stats_1 and curl https://api.github.com/gists/da04f14c93acbe9a7aef827be0a2e91c, piping the gist body through jq into a file and executing it with sh. package.json declares a preinstall hook `sh./prepare.js && exit 0`; prepare.js is not shipped so the current tarball fails open, but x.js is listed in `files` and matches the exact `sh <file>` invocation shape, leaving the dropper one filename change (or a manual `sh x.js`) away from live execution. The gist body is attacker-mutable, allowing arbitrary code to be delivered to any host that executes x.js via sh, and the webhook endpoint acts as an install beacon.

Text from the OSV record.

Recommendation

Remove the package and rotate any secret the machine that installed it could reach. There is no version to update to.

Affected

  • formatting-subtitlesnpm

    No versions listed

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.