# MAL-2026-6516: Malicious code in inlifegram (PyPI)


- **Type:** Malicious package
- **Package:** `inlifegram` (PyPI)
- **Published:** 26 Jun 2026

## What is MAL-2026-6516?

MAL-2026-6516 is a malicious package in inlifegram, published on 26 Jun 2026. 

### Official description

InLifeGram distributes a modified copy of the `pyrogram` Telegram client library and installs it into the top-level `pyrogram` import namespace, so `import pyrogram` after installation resolves to this fork. The fork's Client start path has been modified to lazily import a sibling module (`from. import app as secret`) and, when the authenticated account is a bot (`self.me.is_bot`), call `secret.init(self)` wrapped in a bare `except Exception: pass`. The call hands the fully authenticated client object — containing the bot token, api_id/api_hash, and MTProto auth_key — to undocumented code. The receiving `app.py` module consists of a single `exec(zlib.decompress(base64.b85decode(b'...')).decode())` over an ~11KB opaque blob, with no other functionality and an Indonesian-language header threatening anyone who removes 'credits'. The multi-layer obfuscation (base85 → zlib → exec), the silent invocation on bot authentication, and the bare-except suppression are the canonical shape of a session/token-stealing backdoor. README links a sibling project `VLife-Gram` by the same author, indicating a family of trojanized forks. Any program that installs InLifeGram and runs a Pyrogram bot will silently surrender its bot session to the hidden payload on every successful login.

The modified version of a Telegram bot library. The obfuscated code, launched when the user starts their own bot application, attaches malicious backdoor commands to the Telegram bot. They allow hardcoded users to execute any commands in the bot's environment.

---

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

Campaign: 2026-06-inlifegram

Reasons (based on the campaign):

 - clones-real-package

 - obfuscation

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

 - rat

 - target:telegram

 - action-hidden-in-lib-usage

 - backdoor

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

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

## Sources

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

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