Malicious Code Execution Vulnerability in sympy-dev Package
Summary
MAL-2026-450: Malicious code in sympy-dev (PyPI). Affects sympy-dev versions 1.2.3 – 1.2.6. 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 sympy-dev package is a Python library intended for symbolic mathematics, offering functionalities for algebra, calculus, and other mathematical computations. However, this particular version of the package has been found to impersonate the popular sympy package while exhibiting malicious behavior, including downloading and executing code from remote servers.
Vulnerability Detail
The vulnerability arises from the sympy-dev package's capability to download and execute arbitrary code from remote servers. This behavior indicates a serious security risk, as it can lead to unauthorized access, data breaches, and system compromise. The malicious code execution is facilitated through multiple files and IP addresses, making it difficult to trace and mitigate the threat effectively. Users of this package are at risk of having their systems exploited by attackers leveraging this vulnerability.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall sympy-dev
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 measure, users can avoid using the sympy-dev package altogether and rely on the official sympy package for their mathematical computations. This will prevent any potential exploitation of the malicious code present in sympy-dev.
Conclusion
The sympy-dev package poses a significant security risk due to its malicious behavior of executing remote code. Users are strongly advised to uninstall this package and switch to the legitimate sympy package to ensure their systems remain secure.
See every vulnerability recorded for sympy-dev →
FAQ
The sympy-dev package is a Python library for symbolic mathematics, but it has been identified as malicious, impersonating the legitimate sympy package.
The vulnerability allows the package to download and execute malicious code, potentially compromising your system and data security.
You should uninstall sympy-dev immediately and install the official sympy package to mitigate the risk.
Yes, you can use Vulert's playground at Vulert Scanner to check for vulnerabilities in your application without needing to sign up.
Vulert is a tool that monitors and alerts for open-source vulnerabilities in software using just the Pipfile.lock, providing real-time insights.