MAL-2025-6540 Malicious code in mainx (PyPI)

Malicious package Published
Package
mainx
Registry
PyPI

What is MAL-2025-6540?

MAL-2025-6540 is a malicious package in mainx, published on 24 Jun 2025.

Official description

While described as educational package to simulate post-exploitation environment, the malware is active and once started, automatically attempts to exfiltrate sensitive data (credentials, cookies, etc.) and places a Discord implant. The remote target is hard coded in the code.


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

Campaign: 2025-06-mainx

Reasons (based on the campaign):

  • obfuscation

  • infostealer

  • files-exfiltration

  • exfiltration-credentials

  • exfiltration-browser-data

  • peristence-autorun

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

What should I do about MAL-2025-6540?

Remove the package from your dependencies and lockfiles, then rotate any secrets on machines where it was installed.

Sources

Is MAL-2025-6540 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free