Malicious code in affinequant (PyPI)
The affinequant package on PyPI contained malicious code that exfiltrated basic system information (hostname, path, username) to the package author upon installation or import. The package was part of a broader campaign of malicious packages on PyPI and communicated with a domain associated with malicious activity.
- Disclosed
- Last updated
- Blast radius
- Any user who installed or imported the affinequant package from PyPI
- Ecosystems
- Attack vectors
- Affected entities
- affinequant · 99.6
The affinequant package published on PyPI was identified as malicious by both the OpenSSF Package Analysis project and security researchers. The package contained code that triggered data exfiltration upon installation or module import, collecting basic system information including hostname, path, and username and reporting it to the package author.\n\nThe malicious package was part of a broader campaign (2024-11-byted-dast) of pentest-themed packages flooding PyPI. While the exfiltration capability was limited in scope, the package also communicated with a domain associated with malicious activity, indicating coordination with a broader threat infrastructure.\n\nThe package exhibited characteristics consistent with typosquatting and dependency-confusion attack vectors, suggesting it was designed to trick developers into installing it either through name similarity or as a transitive dependency.\n\nThe incident has been documented by the OpenSSF malicious-packages repository and addressed through PyPI's removal mechanisms.
Indicators of compromise
- Packages
- affinequant
Remediation
- Remove the affinequant package from all environments where it was installed
- Audit systems that installed or imported affinequant for unauthorized access or data exfiltration
- Review PyPI package dependencies for similar suspicious packages, particularly those with pentest-themed names
- Implement package verification and scanning in dependency management workflows
- Monitor for similar packages in the 2024-11-byted-dast campaign
Sources
- GitHub Advisory GHSA-8c6h-7rfr-6vvr · GitHub Advisory Database
Cite this entry
"Malicious code in affinequant (PyPI)." supplychainattack.org, Supply Chain Attack Incident Catalog. Disclosed July 21, 2026; last updated July 21, 2026. https://supplychainattack.org/incident/malicious-code-in-affinequant-pypi-jw9by1
Suggest a correction
Found an error or have a newer source? Corrections to factual errors take priority over new entries.
Related incidents
- resolvedhigh
Malicious code in adandu (PyPI)
The PyPI package 'adandu' was identified as malicious, containing code to exfiltrate basic system information (hostname, path, username) upon installation or import. The package was part of a broader campaign of pentest-themed malicious packages and communicated with domains associated with malicious activity.
PyPICompromised packageTyposquattingDependency confusion - resolvedhigh
Malicious code in adandv (PyPI)
The adandv package on PyPI contained malicious code designed to exfiltrate basic system information (hostname, path, username) to the package author. The package was part of a broader campaign of malicious pentest-themed packages flooding PyPI.
PyPICompromised packageTyposquattingDependency confusion - resolvedhigh
Malicious code in adanbu (PyPI)
The PyPI package 'adanbu' version 92.6 contained malicious code that exfiltrated basic system information (hostname, path, username) to the package author upon installation or import. The package was part of a broader campaign of pentest-themed malicious packages on PyPI.
PyPICompromised packageTyposquattingDependency confusion - resolvedcritical
Malicious code in yelp-pkg (PyPI)
yelp-pkg, a malicious package on PyPI, was designed to exfiltrate sensitive data including environment variables during installation. The package overrides the install command in setup.py to execute malicious code and appears to be a typosquatting attack.
PyPICompromised packageTyposquatting