---
id: "CVE-2024-27444"
kind: "vulnerability"
aliases: ["CVE-2024-27444", "GHSA-v8vj-cv27-hjv8"]
title: "LangChain Experimental vulnerable to arbitrary code execution"
severity: "critical"
cvss: 9.8
epss: 0.00773
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "langchain-experimental", "fixed": ["0.0.52"], "affected": "< 0.0.52", "ecosystem": "pypi"}, {"name": "langchain langchain-experimental", "fixed": ["0.1.8"], "affected": "< 0.1.8", "ecosystem": "vendor"}]
ecosystems: ["pypi", "vendor"]
tags: ["ai-agents", "ai-tooling", "cwe-749", "langchain", "pypi", "python"]
not_affected_if: ["not-using-pal-chain", "trusted-input-only"]
published_at: "2024-02-26T16:28:00+00:00"
first_seen_at: "2026-10-27T16:56:21+00:00"
updated_at: "2026-10-27T17:03:04+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-v8vj-cv27-hjv8", "first_seen_at": "2026-10-27T16:56:21+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-27444", "first_seen_at": "2026-10-27T17:03:04+00:00"}]
---

# LangChain Experimental vulnerable to arbitrary code execution

LangChain Experimental before 0.0.52 fails to block dangerous Python dunder attributes such as __import__, __subclasses__ and __globals__ in its PAL chain, bypassing the earlier CVE-2023-44467 fix. An attacker who can get text into the chain's input can execute arbitrary code on the host running it.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:langchain-experimental affected < 0.0.52 fixed 0.0.52
- vendor:langchain langchain-experimental affected < 0.1.8 fixed 0.1.8

## How to check

- Run `pip show langchain-experimental` and confirm the version is below `0.0.52`.
- Check whether the application uses `PALChain` or `pal_chain` from `langchain_experimental`.

## Fix

- Upgrade `langchain-experimental` to `0.0.52` or later.
- Upgrade `langchain` to `0.1.8` or later if it is used alongside the experimental package.

## Timeline

- 2026-10-27T16:56:21+00:00 ghsa https://github.com/advisories/GHSA-v8vj-cv27-hjv8
- 2026-10-27T17:03:04+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2024-27444

## From the sources

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`.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
