Malicious code in defi-kit (PyPI)
The PyPI package 'defi-kit' version 2.1.1 contains malicious code in its _compat.py module. When imported, it runs a function that stealthily collects sensitive credential files and environment data from the host, including SSH keys, cloud credentials, Kubernetes tokens, and various configuration files. This data is compressed, encoded, and exfiltrated to two hardcoded external IP addresses. The module disguises this behavior under misleading names suggesting compatibility or telemetry functionality.
AI Analysis
Technical Summary
The 'defi-kit' package version 2.1.1 includes a malicious module '_compat.py' that executes a 'check()' function spawning a daemon thread to harvest a wide range of sensitive credentials and configuration files from the host environment. The harvested data includes SSH keys, AWS credentials, Google Cloud JSON files, Kubernetes service account tokens, Docker and npm configuration files, git credentials, GnuPG private keys, Ethereum keystore files, shell histories, and environment files within user directories. This data is archived, base64-encoded, and exfiltrated via HTTP POST requests to two hardcoded IPv4 addresses on port 8877. The naming of variables and functions attempts to disguise the malicious activity as telemetry or compatibility checks.
Potential Impact
Sensitive credentials and environment information from the host system are exfiltrated to attacker-controlled servers, potentially enabling unauthorized access to cloud services, source code repositories, cryptographic keys, and other critical resources. This compromises the confidentiality and integrity of the affected host and any connected infrastructure relying on these credentials.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package version. Users should immediately remove 'defi-kit' version 2.1.1 from their environments and avoid installing or importing this package. Verify that no sensitive credentials have been compromised and rotate any potentially exposed keys or tokens. Monitor for any unauthorized access resulting from this compromise. Check the PyPI repository and vendor advisories for updates or removal of the malicious package.
Malicious code in defi-kit (PyPI)
Description
The PyPI package 'defi-kit' version 2.1.1 contains malicious code in its _compat.py module. When imported, it runs a function that stealthily collects sensitive credential files and environment data from the host, including SSH keys, cloud credentials, Kubernetes tokens, and various configuration files. This data is compressed, encoded, and exfiltrated to two hardcoded external IP addresses. The module disguises this behavior under misleading names suggesting compatibility or telemetry functionality.
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The 'defi-kit' package version 2.1.1 includes a malicious module '_compat.py' that executes a 'check()' function spawning a daemon thread to harvest a wide range of sensitive credentials and configuration files from the host environment. The harvested data includes SSH keys, AWS credentials, Google Cloud JSON files, Kubernetes service account tokens, Docker and npm configuration files, git credentials, GnuPG private keys, Ethereum keystore files, shell histories, and environment files within user directories. This data is archived, base64-encoded, and exfiltrated via HTTP POST requests to two hardcoded IPv4 addresses on port 8877. The naming of variables and functions attempts to disguise the malicious activity as telemetry or compatibility checks.
Potential Impact
Sensitive credentials and environment information from the host system are exfiltrated to attacker-controlled servers, potentially enabling unauthorized access to cloud services, source code repositories, cryptographic keys, and other critical resources. This compromises the confidentiality and integrity of the affected host and any connected infrastructure relying on these credentials.
Mitigation Recommendations
No official patch or remediation is currently available for this malicious package version. Users should immediately remove 'defi-kit' version 2.1.1 from their environments and avoid installing or importing this package. Verify that no sensitive credentials have been compromised and rotate any potentially exposed keys or tokens. Monitor for any unauthorized access resulting from this compromise. Check the PyPI repository and vendor advisories for updates or removal of the malicious package.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- MAL-2026-10926
- Osv Schema Version
- 1.7.4
- Aliases
- []
- Ecosystems
- ["PyPI"]
- Database Specific Severity
- null
- Cvss Version
- null
Threat ID: 6a5e79ef2a4a8d59899bc25d
Added to database: 07/20/2026, 19:41:35 UTC
Last enriched: 07/20/2026, 19:49:12 UTC
Last updated: 07/21/2026, 05:19:33 UTC
Views: 8
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.