INCIDENT MAP

Browse / Improper Output Handling / CVE-2024-27444

LangChain Experimental vulnerable to arbitrary code execution

CVE-2024-27444 ยท 2024-02-26 critical

Class
Improper Output Handling (filed by a model that read the advisory)
Technique
Code and command execution
Also involves
Direct Prompt Injection
Affected
langchain-experimental (PyPI)
Gets past
Input filter or sanitiser
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.8% chance of exploitation in 30 days

How it works, in short

A blocklist of dunder attributes in the PAL chain's generated Python can be sidestepped using other attributes, letting model-written code reach arbitrary execution. (Our summary, written by a model. The source text is below.)

Details

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.