# CVE-2024-27444: LangChain Experimental vulnerable to arbitrary code execution

Source: https://junglewise.ai/threats/cve-2024-27444-langchain-experimental-vulnerable-to-arbitrary-code-execution  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2024-02-26  
License: CC BY 4.0 with a link back

CVE-2024-27444 · Severity: critical · CVSS 9.8 · Published 2024-02-26

langchain_experimental (aka LangChain Experimental) before 0.0.52, part of LangChain before 0.1.8, allows an attacker to bypass the CVE-2023-44467 fix and execute arbitrary code via the `__import__`, `__subclasses__`, `__builtins__`, `__globals__`, `__getattribute__`, `__bases__`, `__mro__`, or `__base__` attribute in Python code. These are not prohibited by `pal_chain/base.py`.

Technologies: [langchain-experimental (PyPI)](https://junglewise.ai/threats/technologies/langchain-experimental). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-27444 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-27444 being exploited in the wild.

**How severe is CVE-2024-27444?** Critical severity, with a CVSS score of 9.8, published 26 February 2024.

**Which products and versions are affected?** langchain-experimental (PyPI) < 0.0.52, ECOSYSTEM:introduced=0,fixed=0.0.52.

**Is there a fix for CVE-2024-27444?** Yes. langchain-experimental (PyPI): upgrade to 0.0.52 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2024-27444?** Check whether you run langchain-experimental (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- langchain-experimental (PyPI): upgrade to 0.0.52 or later

  ```sh
  pip install "langchain-experimental>=0.0.52"
  ```


## Affected products

- langchain-experimental (PyPI) < 0.0.52, ECOSYSTEM:introduced=0,fixed=0.0.52

## Identifiers

- CVE-2024-27444
- GHSA-v8vj-cv27-hjv8
- PYSEC-2026-375

## Related threats

- [LangChain Experimental Eval Injection vulnerability](https://junglewise.ai/threats/cve-2024-46946-langchain-experimental-eval-injection-vulnerability)
- [langchain-experimental vulnerable to Arbitrary Code Execution](https://junglewise.ai/threats/cve-2024-21513-langchain-experimental-vulnerable-to-arbitrary-code-execution)
- [langchain_experimental Code Execution via Python REPL access](https://junglewise.ai/threats/cve-2024-38459-langchain-experimental-code-execution-via-python-repl-access)
- [langchain_experimental vulnerable to arbitrary code execution via PALChain in the python exec method](https://junglewise.ai/threats/cve-2023-44467-langchain-experimental-vulnerable-to-arbitrary-code-execution-via)
