# MAL-2024-12239: Malicious code in cobo-python (PyPI)


- **Type:** Malicious package
- **Package:** `cobo-python` (PyPI)
- **Published:** 7 Sep 2024

## What is MAL-2024-12239?

MAL-2024-12239 is a malicious package in cobo-python, published on 7 Sep 2024. 

### Official description

It appears to be a forgotten pentest checking typosquatting against cobo-custody package, but may also have malicious purposes. During installation, if a machine is Mac, an obfuscated code attempts to download and execute a shell script. Currently, the server does not respond.

---

Category: PROBABLY_PENTEST - Packages looking like typical pentest packages, but also anything that looks like testing, exploring pre-prepared kits, research & co, with clearly low-harm possibilities.

Campaign: 2024-08-old-cobo-sectest

Reasons (based on the campaign):

 - Downloads and executes a remote executable.

 - clones-real-package

 - crypto-related

 - The package overrides the install command in setup.py to execute malicious code during installation.

 - obfuscation

 - typosquatting

## What should I do about MAL-2024-12239?

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-2024-12239 is a malicious package: cobo-python (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-2024-12239/ (Markdown: https://insights.sbomify.com/MAL-2024-12239/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/MAL-2024-12239

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