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.pyhas 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
aiocpaat version 0.1.13 or 0.1.14. The internal module name iscryptopay. - 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
- Run
pip uninstall aiocpain every environment. - Revoke and replace every Crypto Pay API token that you passed to the client.
- Review your Crypto Pay account for unexpected activity.
- 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.
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
Send this page to the person who looks after AI at your company.