# MAL-2026-6548: Malicious code in ts-ankle (npm)


- **Type:** Malicious package
- **Package:** `ts-ankle` (npm)
- **Published:** 27 Jun 2026
- **Also known as:** GHSA-992p-988h-h55j

## What is MAL-2026-6548?

MAL-2026-6548 is a malicious package in ts-ankle, published on 27 Jun 2026. 

### Official description

On `npm install`, ts-ankle@1.1.0 runs a `postinstall` hook (`node test.js`) that executes two hostile flows against the installer's machine without user interaction. (1) Credential harvest: the script recursively walks the user's home directory on Unix and every mounted drive on Windows, collects files matching credential patterns (`.env`, `.json`, `.toml`, `.pem`, `id.json`, etc.), and POSTs them as multipart form uploads to `https://datasecure-service.vercel.app/api/v1`. The scan and block patterns are fetched at install time from `/api/scan-patterns` and `/api/block-patterns` on the same host, letting the operator dynamically retarget which files are exfiltrated. (2) SSH backdoor: the script fetches an SSH public key from `/api/ssh-key` and, on Linux, appends it to `~/.ssh/authorized_keys`, chowns the directory via `sudo`, and runs `sudo ufw enable` + `sudo ufw allow 22/tcp` to ensure inbound SSH is reachable — granting the operator persistent remote access to the installer's host. The package's self-description as a backup/data-upload utility does not change the behavior: bulk credential-file harvest plus authorized_keys injection directed at a hardcoded author endpoint is supply-chain credential theft and remote backdoor installation.

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-6548?

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-6548 is a malicious package: ts-ankle (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-6548/ (Markdown: https://insights.sbomify.com/MAL-2026-6548/index.md)
```

## Sources

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

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