PyPI

The aiocpa PyPI Supply Chain Attack

Updated 5 Oct 2026 · Incident date 20 Nov 2024

aiocpa 0.1.13 and 0.1.14 on PyPI sent the Crypto Pay client's API token to an attacker's Telegram bot on 20 November 2024.

PyPI quarantined the package and then removed it. GitHub advisory GHSA-486g-47cc-8wxf lists severity High (CVSS 8.3) and no CVE.

What happened

The attackers built a real crypto client first and added malware in a later release.

  • Version 0.1.13 went up at 18:04 UTC on 20 November 2024, and 0.1.14 at 18:50 UTC.
  • The code in cryptopay/utils/sync.py has about 50 layers of obfuscation.
  • It takes over the CryptoPay constructor.
  • It sends the tokens and API server details to the attacker's Telegram bot.
  • The GitHub repository held clean code.

ReversingLabs reported the package at 16:18 UTC on 21 November. PyPI quarantined it at 18:29 UTC.

Affected versions

  • Malicious: aiocpa 0.1.13 and 0.1.14.
  • Clean per PyPI: 0.1.0 through 0.1.12.
  • No patched release exists. PyPI removed all affected versions.

Indicators of compromise

  • Package name aiocpa at version 0.1.13 or 0.1.14. The internal module name is cryptopay.
  • Heavily obfuscated Base64 and zlib code in cryptopay/utils/sync.py.
  • SHA1 of the 0.1.13 file listed by ReversingLabs: a1187d2a4acfe8ddaee3c7be79a9bb838142903a.
  • SHA1 of the 0.1.14 file listed by ReversingLabs: 01f7db47368bffa279fb15c688518774454650cf.
  • Outbound requests to a Telegram bot API endpoint when your code creates the Crypto Pay client.

ReversingLabs lists the hashes as a partial list. The sources do not give the bot token or chat id.

How to check

Check which version is installed. Do not import the package to test it.

pip show aiocpa

Search every lockfile and requirements file.

grep -rniE "aiocpa==?0\.1\.1[34]" . --include="*.txt" --include="*.lock" --include="*.toml"

What to do now

  1. Run pip uninstall aiocpa in every environment.
  2. Revoke and replace every Crypto Pay API token that you passed to the client.
  3. Review your Crypto Pay account for unexpected activity.
  4. Pin dependency versions with hash checking.

What Vigilance would show

These examples show an install hold and the corresponding owner report.

Example install message

Vigilance blocked `aiocpa` 0.1.13. This version is too new or changed in a way Vigilance must check first.

Example owner report

Bad update

aiocpa 0.1.13

A payments library gained heavily disguised code that copied the user's API password to a chat bot.

See what to do now.

No security team? See who reads the alert.

Frequently asked questions

How many downloads did aiocpa have?

ReversingLabs reports more than 10,000 downloads before removal.

When did PyPI publish its analysis?

PyPI published its analysis on 25 November 2024.

Sources

  1. blog.pypi.org/posts/2024-11-25-aiocpa-attack-analysis/
  2. github.com/advisories/GHSA-486g-47cc-8wxf
  3. reversinglabs.com/blog/malicious-pypi-crypto-pay-package-aiocpa-implants-infostealer-code

Send this page to the person who looks after AI at your company.

Email it

More supply chain attacks

All 172 attacks in the library · What is a supply chain attack? · How to prevent supply chain attacks

Check the next update before you install it

Vigilance compares the version you trust with the new one. It names the one file that gained a power the old version did not have.

Start the free 14-day trialBrowse the attack library