# MAL-2024-2031: Malicious code in crosswalker (npm)


- **Type:** Malicious package
- **Package:** `crosswalker` (npm)
- **Published:** 25 Jun 2024
- **Also known as:** GHSA-9wxp-r2hc-p64q

## What is MAL-2024-2031?

MAL-2024-2031 is a malicious package in crosswalker, published on 25 Jun 2024. 

### Official description

package.json declares `preinstall: node index.js`, causing index.js to run automatically on `npm install`. The script collects hostname, platform, arch, homedir, username, uid/gid, shell, OS info, cwd, and the output of `whoami` and `id`, then POSTs the JSON payload to a hardcoded URL at `https://kbz9yyzq2mtljdwwf6r0tpzlfcl39txi.oastify.com/detox56`. The destination is a Burp Collaborator subdomain — out-of-band infrastructure used to confirm exfiltration / RCE during dependency-confusion reconnaissance. Installer host and user identifiers leave the machine without consent on every install.

## What should I do about MAL-2024-2031?

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-2024-2031 is a malicious package: crosswalker (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-2024-2031/ (Markdown: https://insights.sbomify.com/MAL-2024-2031/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2024-2031

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