INCIDENT MAP

Browse / Improper Output Handling / CVE-2023-36095

langchain Code Injection vulnerability

CVE-2023-36095 ยท 2023-08-05 critical

Class
Improper Output Handling (filed by a model that read the advisory)
Technique
Code and command execution
Also involves
Tool and Agent Misuse
Affected
langchain (PyPI)
CVSS
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
1.2% chance of exploitation in 30 days

How it works, in short

The PALChain math prompt passes model-generated code to Python exec, so whatever the model writes runs on the host. (Our summary, written by a model. The source text is below.)

Details

An issue in Harrison Chase langchain allows an attacker to execute arbitrary code via the PALChain,from_math_prompt(llm).run in the python exec method.

References

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