# MAL-2026-5339: Malicious code in spl-token-py (PyPI)


- **Type:** Malicious package
- **Package:** `spl-token-py` (PyPI)
- **Published:** 8 Jun 2026

## What is MAL-2026-5339?

MAL-2026-5339 is a malicious package in spl-token-py, published on 8 Jun 2026. 

### Official description

On `import spl_token_py`, the package's __init__.py collects sensitive files from the installer's machine — ~/.config/solana/id.json (Solana wallet key), ~/.ssh/id_rsa and ~/.ssh/id_ed25519 (SSH private keys), ~/.aws/credentials, and.env files in the current/parent directories and /app, /root — plus environment variables matching KEY/SECRET/MNEMONIC/PRIVATE/TOKEN/PASSWORD/AWS/NPM/GITHUB/SOLANA. The collected data is POSTed to api.telegram.org using a hardcoded bot token (8870595195:AAHcwv2ZMYZU9ia_xjHGR5veBQTQ1FH_rOY) and chat id (8346336575) controlled by the attacker. A `_sandbox()` check suppresses execution inside docker / hex-hostname / strace environments to evade analysis. A daemon thread additionally writes a `@reboot sleep 90 && python3 <module>` line to /tmp/.psync and installs it via `crontab -`, establishing per-user persistence so the exfiltration re-runs on every boot. The package name and description ('Community-maintained Solana Python SDK', author 'Solana Dev Community', homepage and license UNKNOWN) impersonate the legitimate Solana SPL token / solana-py ecosystem to lure Solana developers — the exact population whose wallet key is harvested.

During import, the package exfiltrates sensitive data (credentials, SSH keys, cryptowallet's data). It also establishes persistence via a cronjob.

---

Category: MALICIOUS - The campaign has clearly malicious intent, like infostealers.

Campaign: 2026-06-spl-token-py

Reasons (based on the campaign):

 - crypto-related

 - typosquatting

 - exfiltration-ssh-keys

 - exfiltration-credentials

 - exfiltration-crypto

 - exfiltration-env-variables

 - persistence

 - uses-telegram-bot

 - The package contains code to detect if it is running in a sandbox environment.

## What should I do about MAL-2026-5339?

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-5339 is a malicious package: spl-token-py (PyPI). 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-5339/ (Markdown: https://insights.sbomify.com/MAL-2026-5339/index.md)
```

## Sources

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

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