# MAL-2026-17417: Malicious code in beautifytext (PyPI)


- **Type:** Malicious package
- **Package:** `beautifytext` (PyPI)
- **Published:** 30 Sep 2026

## What is MAL-2026-17417?

MAL-2026-17417 is a malicious package in beautifytext, published on 30 Sep 2026. 

### Official description

beautifytext 1.0.3 imports beautifyText/_compat.py from its __init__.py and from a setup.py install hook. That module starts a detached background process that registers the host (hostname, user, OS, working directory) with https://bleodw.wisp.uno, then polls it for jobs to run shell commands or read and write files, and posts the results back.

beautifyText 1.0.3 is a backdoor disguised as a text utility. On `import beautifyText`, the package spawns a detached background Python process (via a module named `_compat`) that decodes a base64-obfuscated C2 URL (https://bleodw.wisp.uno) and enters a long-poll loop against `/work/{id}`. The command channel implements three job kinds: `exec` runs arbitrary shell commands via subprocess with `shell=True`, `pull` reads arbitrary files from the installer's host, and `push` writes arbitrary files to the installer's host, with results POSTed back to `/result`. On registration, host metadata (hostname, OS/release, Python version, USER/USERNAME, current working directory) is sent to `/register`, and `/heartbeat` maintains the session. setup.py installs an `install` and `develop` cmdclass override whose `run()` calls `_post_install()`, which imports `beautifyText._compat` and triggers the same beacon during `pip install`, so the backdoor activates on install even without a subsequent import. The C2 host is stored as a base64 literal (`_HOST_B64 = aHR0cHM6Ly9ibGVvZHcud2lzcC51bm8=`) and decoded at runtime to evade static string matching. The process is detached so it survives parent-process exit.

During import, the package silently spans a separate process that waits for and executes remote commands.

---

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

Campaign: 2026-07-beautifytext

Reasons (based on the campaign):

 - rat

 - The package contains code to execute remote commands (probably limited to a specific set) on the victim's machine.

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

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

## Sources

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

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