# MAL-2026-4228: Malicious code in @tiledesk/tiledesk-server (npm)


- **Type:** Malicious package
- **Package:** `@tiledesk/tiledesk-server` (npm)
- **Published:** 21 May 2026
- **Also known as:** GHSA-5vfv-hpg7-77hj

## What is MAL-2026-4228?

MAL-2026-4228 is a malicious package in @tiledesk/tiledesk-server, published on 21 May 2026. 

### Official description

`@tiledesk/tiledesk-server` version 2.18.12 is a compromised release of the legitimate Tiledesk customer support platform package. This version was injected with a CI pipeline backdoor as part of the **megalodon** campaign — a mass GitHub repository backdooring operation targeting CI/CD runner environments.

**Attack vector:** The malicious payload is embedded in `.github/workflows/docker-community-worker-push-latest.yml` within the npm tarball, in a step named "Optimize-Build". The step decodes and executes a base64-encoded shell script (`set +e; echo "<base64>" | base64 -d | bash`).

**What it does:** The decoded script is a multi-stage CI credential harvester:
- Dumps all environment variables via `printenv` and scrapes `/proc/self/environ` and `/proc/[0-9]*/environ`, capturing secrets from every process on the runner
- Exfiltrates credential files: `~/.aws/credentials`, `~/.ssh/`, `~/.docker/config.json`, `~/.npmrc`, `~/.kube/config`, `~/.vault-token`, `.git-credentials`, GCP Application Default Credentials, and Terraform credentials
- Enumerates AWS profiles to extract access keys, secret keys, and session tokens; runs `gcloud auth print-access-token` for GCP
- Queries cloud IMDS endpoints (`169.254.169.254`, `metadata.google.internal`) for instance credentials
- Steals `ACTIONS_ID_TOKEN_REQUEST_TOKEN` to mint arbitrary OIDC tokens for cloud impersonation
- Scans `/var/www`, `/opt`, `/srv` for certificate files (`.pem`, `.key`, `.p12`, `.pfx`) and runs regex-based secret scanning for 30+ patterns including AWS AKIA keys, GitHub PATs, npm tokens, PyPI tokens, private keys, and database connection strings

**C2 infrastructure:** All stolen data is exfiltrated via HTTP POST to `http://216.126.225.129:8443` with query parameters `?h=megalodon&l=gh_dump&id=hefs8esnhgkx`.

**Trigger:** Execution occurs during GitHub Actions Docker build workflows. Any CI pipeline that included this package version in a Docker build would have had its entire runner secrets environment exfiltrated at build time.

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

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-4228 is a malicious package: @tiledesk/tiledesk-server (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-4228/ (Markdown: https://insights.sbomify.com/MAL-2026-4228/index.md)
```

## Sources

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

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