setup.mjs
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
Stage 1 – Loader (setup.mjs) : Télécharge un runtime Bun standalone ... Exécute le second stage via Bun ... La compromission repose sur un hook preinstall ( setup.mjs ) ajouté au package.json .
Techniques & procedures
19 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
5 techniques
Initial Access
Version 7.0.4 introduced three files and a single added line in package.json that turned every npm install into remote code execution.
Because the attacker pushed malicious files straight to each repository’s main branch and then immediately cut a new release, the poisoned versions were published to npm carrying valid provenance signatures generated by GitHub Actions
Le compte maintainer Jaredwray a été compromis et utilisé pour publier des versions malveillantes... La compromission repose sur un hook preinstall (setup.mjs) ajouté au package.json.
in an attempt to infect users who open the repo in Claude Code or VSCode
dual social engineering layers impersonating both Claude AI and Dependabot at the code review level
Execution
7 techniques
Execution
If the malware executed on a developer machine (via npm install), it drops several persistence mechanisms: .vscode/tasks.json with a folderOpen task that re-executes the malware on every VS Code workspace open.
Execution: Used a preinstall hook to download the Bun runtime and execute the obfuscated Math_Symbol.js payload. | Downloads the Bun JavaScript runtime v1.3.13 directly from its official GitHub release page. Launches the second-stage payload via Bun.
The implementation also follows HTTP redirects without validating the destination and uses PowerShell with -ExecutionPolicy Bypass on Windows, increasing the risk for affected developer and CI/CD environments.
Stage 1 – Loader (setup.mjs) : Télécharge un runtime Bun standalone... Exécute le second stage via Bun
La compromission repose sur un hook preinstall (setup.mjs) ajouté au package.json... Stage 2 – Payload (Math_Symbol.js, ~728 KB)
в package.json появлялся preinstall-скрипт node setup.mjs. В результате вредонос запускался автоматически при выполнении npm install, еще до завершения установки пакета.
In the SAP wave, the compromised packages added a preinstall hook that ran setup.mjs... This wave uses a slightly different route... That Git dependency contains a prepare script: "scripts" : { "prepare" : "bun run tanstack_runner.js && exit 1" } This is the trick. npm runs lifecycle scripts for Git dependencies during installation.
Persistence
3 techniques
Persistence
If the malware executed on a developer machine (via npm install), it drops several persistence mechanisms: .vscode/tasks.json with a folderOpen task that re-executes the malware on every VS Code workspace open.
L’esecuzione del contenuto malevolo avviene durante la fase di installazione del pacchetto, prima del completamento della procedura npm.
package.json was modified to add: "scripts" : { "preinstall" : "node setup.mjs" } That means the malicious code runs automatically during npm install, before the install has even completed.
Privilege Escalation
3 techniques
Privilege Escalation
If the malware executed on a developer machine (via npm install), it drops several persistence mechanisms: .vscode/tasks.json with a folderOpen task that re-executes the malware on every VS Code workspace open.
L’esecuzione del contenuto malevolo avviene durante la fase di installazione del pacchetto, prima del completamento della procedura npm.
package.json was modified to add: "scripts" : { "preinstall" : "node setup.mjs" } That means the malicious code runs automatically during npm install, before the install has even completed.
Stealth
5 techniques
Stealth
a file named setup.mjs, an obfuscated dropper
The payload creates a new branch named dependabout/github_actions/format/setup-formatter ... The commit impersonates Dependabot ... The commit author and message are carefully chosen: claude <claude@users.noreply.github.com>
Checks for a Russian-language system locale; if found, it exits without executing. This is a common evasion technique used to avoid targeting certain regions.
в package.json появлялся preinstall-скрипт node setup.mjs. В результате вредонос запускался автоматически при выполнении npm install, еще до завершения установки пакета.
In the SAP wave, the compromised packages added a preinstall hook that ran setup.mjs... This wave uses a slightly different route... That Git dependency contains a prepare script: "scripts" : { "prepare" : "bun run tanstack_runner.js && exit 1" } This is the trick. npm runs lifecycle scripts for Git dependencies during installation.
Discovery
1 technique
Discovery
Checks for a Russian-language system locale; if found, it exits without executing. This is a common evasion technique used to avoid targeting certain regions.
Lateral Movement
1 technique
Lateral Movement
The below files are placed in the repo, in an attempt to infect users who open the repo in Claude Code or VSCode
Command and Control
1 technique
Command and Control
Загрузчик скачивал официальный рантайм Bun с GitHub, запускал с его помощью инфостилер, а затем удалял временную директорию.
Observables
5 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
2 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.