Malicious Code Execution in python-anchor Package
Summary
MAL-2026-1435: Malicious code in python-anchor (PyPI). Affects python-anchor versions 13.3.0 – 15.0.0. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The python-anchor package is a library available on PyPI that is designed for various functionalities in Python applications. It allows developers to integrate specific features into their projects easily. However, this package has been compromised, leading to a significant security vulnerability that can execute malicious code during import.
Vulnerability Detail
The vulnerability originates from a malicious executable that is embedded within the package. Upon importing the python-anchor package, the code automatically decrypts and executes this hidden executable, which is encoded and obfuscated within a JSON resource file. This poses severe risks, including unauthorized access to sensitive information, system compromise, and potential data theft. The malicious intent is evident, as it is part of a broader campaign targeting users through malware, obfuscation techniques, dependency confusion, and typosquatting.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall python-anchor
If it arrived as a transitive dependency, remove the package that pulled it in, then reinstall.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
As a temporary workaround, avoid using the python-anchor package until a secure version is released. If you must use it, consider isolating the environment where it is installed to minimize potential damage.
Conclusion
The python-anchor package has been compromised, leading to a serious vulnerability that executes malicious code upon import. It is essential to update to a patched version or remove the package entirely to protect your application and data. Regular monitoring of dependencies is crucial to maintain security.
See every vulnerability recorded for python-anchor →
FAQ
The vulnerability involves the execution of a malicious executable that is hidden within the package, which can lead to severe security risks.
You can use Vulert's playground at Vulert Scanner to monitor and check if your application is affected by this vulnerability without needing to sign up.
If you have installed python-anchor, immediately update to the latest patched version or remove the package from your environment.
The consequences include unauthorized access to sensitive data, system compromise, and potential data theft, which can severely impact your application and users.
To prevent similar vulnerabilities, regularly monitor your dependencies for updates and vulnerabilities, and consider using tools like Vulert for real-time alerts.