# MAL-2026-6549: Malicious code in discord-token-generator (PyPI)


- **Type:** Malicious package
- **Package:** `discord-token-generator` (PyPI)
- **Published:** 27 Jun 2026

## What is MAL-2026-6549?

MAL-2026-6549 is a malicious package in discord-token-generator, published on 27 Jun 2026. 

### Official description

discord_token_generator/__init__.py imports tokens.py, which instantiates TokenManager() at module load. The constructor calls notin(), which concatenates eight large opaque string chunks (ytouhqifgm, nqbardpoze, wqopxtejdv, zywnltfdmd, ljqvzqnjsm, pkehqytikl, pkciygtgum, cmdelmtwgz), base64-decodes the result, XOR-deobfuscates it with key 66, writes the bytes to %TEMP%\tokens.tmp, and launches the file via subprocess.Popen with shell=True and creationflags=0x08000000 (CREATE_NO_WINDOW) so no console appears. Any machine that imports this package runs the decoded Windows binary covertly. The package metadata (name 'discord-token-generator', author 'DiscordDev', email 'dev@discord.com', description 'Generate valid Discord tokens for development and testing') impersonates Discord as a social-engineering lure to attract installers searching for Discord token tooling. The multi-chunk obfuscation, hidden execution flags, and Discord brand impersonation together confirm malicious intent.

During import, package executes the embedded executable. It is an infostealer named internally as "NBSteal", focused on exfiltrating data from browsers, Telegram, Discord, Roblox and other gaming platforms, and other credentials.

---

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

Campaign: 2026-06-discord-token-generator

Reasons (based on the campaign):

 - infostealer

 - files-exfiltration

 - obfuscation

 - exfiltration-browser-data

 - malware

 - target:telegram

 - exfiltration-credentials

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

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

## Sources

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

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