Critical Malicious Code Vulnerability in cpan Package on PyPI
Summary
MAL-2025-6483: Malicious code in cpan (PyPI). Affects cpan versions 0.0.2 – 0.0.3. 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 cpan package is a Python library that provides a simple interface for interacting with the Comprehensive Perl Archive Network (CPAN). It allows users to easily access and manage Perl modules and distributions. However, recent findings have revealed that certain versions of this package contain malicious code, posing significant security risks to users and their applications.
Vulnerability Detail
The vulnerability identified as MAL-2025-6483 affects versions 0.0.2 and 0.0.3 of the cpan package. This malicious code can potentially compromise the integrity of applications that utilize this package, leading to unauthorized access, data breaches, or system instability. The origin of this vulnerability is linked to a malicious actor who has injected harmful code into the package, which can execute arbitrary commands on the host system.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall cpan
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
If immediate updating is not feasible, users can temporarily avoid using the cpan package until a secure version is confirmed. Additionally, consider using alternative libraries that provide similar functionality without the associated risks.
Conclusion
The cpan package on PyPI has been found to contain malicious code in specific versions, posing a serious security threat to users. It is essential to update to a secure version or implement workarounds to mitigate risks. Regular monitoring for vulnerabilities, such as through Vulert, can help maintain application security.
See every vulnerability recorded for cpan →
FAQ
Versions 0.0.2 and 0.0.3 of the cpan package are affected by the malicious code vulnerability.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
If you cannot update the package, avoid using the cpan package until a secure version is available, or consider using alternative libraries.
The vulnerability was discovered by ReversingLabs, a cybersecurity firm specializing in threat intelligence.
Using the affected package can lead to unauthorized access, data breaches, and potential system instability, compromising the security of your application.