Malicious Code Vulnerability in py-publish-test-0126: Dependency Confusion and Data Exfiltration Risk
Summary
MAL-2026-98: Malicious code in py-publish-test-0126 (PyPI). Affects py-publish-test-0126 versions 0.1.0 – 0.2.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 package 'py-publish-test-0126' is a demonstration tool available on PyPI, designed to showcase dependency confusion vulnerabilities. It includes a decorator function for reporting, which may mislead users into thinking it is a legitimate testing tool. However, it contains malicious code that can exfiltrate sensitive data from the user's system.
Vulnerability Detail
The vulnerability in 'py-publish-test-0126' stems from its inclusion of malicious code that can exfiltrate basic system data, such as the user's IP address and username. This package is a result of a dependency confusion attack, where a malicious package is published with a name similar to a legitimate one, tricking users into installing it. The potential ramifications include unauthorized access to sensitive information and a compromised system.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall py-publish-test-0126
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 workaround, users can avoid using the 'py-publish-test-0126' package altogether and look for alternative packages that provide similar functionality without the associated risks.
Conclusion
The 'py-publish-test-0126' package presents a significant security risk due to its malicious code designed for data exfiltration. Users are advised to uninstall this package and remain vigilant about the sources of their dependencies.
See every vulnerability recorded for py-publish-test-0126 →
FAQ
Dependency confusion is a type of attack where a malicious package is published with the same name as a legitimate package, tricking users into installing it.
The malicious code in 'py-publish-test-0126' can exfiltrate basic data such as the user's IP address and username.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
Yes, having this package installed poses a risk as it can lead to unauthorized access to sensitive information on your system.
If you have installed 'py-publish-test-0126', you should uninstall it immediately and consider using alternative packages.