LangChainPublished 5 Apr 2023NVD status: Modified

CVE-2023-29374

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

ComponentLangChain
Severitycritical (CVSS 9.8)
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Published (NVD)2023-04-05
Last modified2026-06-17
Affected versions
<= 0.0.131
from the GitHub-reviewed advisory GHSA-fprp-p869-w6q2
Fixed insee the vendor advisory
WeaknessCWE-74
CISA KEVnot listed

Versions, checked against NVD

NVD's analysis gives the same ranges as the GitHub-reviewed advisory GHSA-fprp-p869-w6q2.

NVD description

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

What to do

  • No fixed release is known yet: follow the vendor advisory below and keep LangChain off the public internet until a fix ships.
  • Do not expose the component's API or UI to the internet without authentication in front of it.

Sources