Malicious Code Exfiltration in langraph Package
Summary
MAL-2024-12375: Malicious code in langraph (PyPI). Affects langraph versions 0.0.0 – 1.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 langraph package, available on PyPI, is designed for specific functionalities related to graphing or data visualization. However, it has been identified as containing malicious code that compromises user data. This vulnerability allows the package to exfiltrate sensitive information from the host system, such as IP addresses and usernames, during installation or module import.
Vulnerability Detail
The vulnerability originates from the package's design, which overrides the install command in setup.py to execute malicious code upon installation. This code is responsible for exfiltrating basic information about the host system, posing a risk to user privacy and security. The malicious behavior is classified under the PROBABLY_PENTEST category, indicating that while it may not cause significant harm, it still represents a security concern that should not be overlooked.
How To Fix
This package is malicious. Remove it and rotate any credentials it could have accessed.
pip uninstall langraph
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 langraph package altogether and look for alternative packages that provide similar functionalities without the associated risks. Additionally, users can monitor their systems for any unauthorized data exfiltration.
Conclusion
The langraph package contains a vulnerability that allows for the exfiltration of sensitive information from the host system. Users are advised to uninstall the package and monitor their systems for any unauthorized access. Utilizing tools like Vulert can help in identifying such vulnerabilities in real-time.
See every vulnerability recorded for langraph →
FAQ
The langraph package is a Python library available on PyPI, primarily used for graphing or data visualization tasks.
The malicious code in langraph exfiltrates basic information such as the user's IP address and username.
You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without needing to sign up.
While the risk is classified as low, the exfiltration of personal data still poses a privacy concern that users should take seriously.
If you have installed langraph, you should uninstall it immediately using the command 'pip uninstall langraph' and consider using alternative packages.