Malicious Code Exfiltration in lanchain-openai Package

lanchain-openai Updated 23 Dec 2025

Summary

23/12/2025
CRITICAL
No i
Critical
Not published

MAL-2025-192699: Malicious code in lanchain-openai (PyPI). Affects lanchain-openai versions 0.0.0 – 1.1.1. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

lanchain-openai is a Python package available on PyPI, designed for integrating OpenAI functionalities into applications. It aims to simplify the use of OpenAI's API for developers. However, the package has been found to contain malicious code that compromises user data, making it a significant security concern.

Vulnerability Detail

The vulnerability originates from the package's code, which exfiltrates basic information about the host system, such as IP addresses and usernames. This malicious behavior is executed during the installation process, as the package overrides the install command in setup.py to run the harmful code. The risk is categorized as limited, but it poses a potential threat to user privacy and system security.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

pip uninstall lanchain-openai

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, users can avoid installing the lanchain-openai package until a secure version is released. Additionally, consider using alternative packages that provide similar functionalities without the associated risks.

Conclusion

The lanchain-openai package has been identified as containing malicious code that can exfiltrate sensitive information from users' systems. It is crucial for users to uninstall the affected versions and monitor for any secure updates. Utilizing tools like Vulert can help in identifying vulnerabilities in open-source packages.

See every vulnerability recorded for lanchain-openai →

Share this vulnerability

FAQ

lanchain-openai is a Python package designed to facilitate the integration of OpenAI's API into applications.

The malicious code exfiltrates basic information such as the host'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 needing to sign up.

Uninstall the affected versions of lanchain-openai and check for a secure version to install.

While the risk is categorized as limited, it is advisable to uninstall the package to protect your data and privacy.

How To Fix

This package is malicious. Remove it and rotate any credentials it could have accessed.

pip uninstall lanchain-openai

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback