INCIDENT MAP

Browse / Direct Prompt Injection / CVE-2023-29374

LangChain vulnerable to code injection

CVE-2023-29374 ยท 2023-04-05 critical

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

How it works, in short

Crafted user input steers the math chain's model into emitting Python that the chain then passes to exec unchecked. (Our summary, written by a model. The source text is below.)

Details

In LangChain through 0.0.131, the LLMMathChain chain allows prompt injection attacks that can execute arbitrary code via the Python exec() method.

References

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