Every CVESearch/Get API key

CVE-2023-29374

LangChain vulnerable to code injection

9.8 CriticalFix available

CVE-2023-29374 is a critical vulnerability (CVSS 9.8) in Langchain, published April 5, 2023. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 39.7%, the 98th percentile. Fixed in langchain 0.0.132.

What does this mean?
Severity
9.8 CriticalCVSS 3.1, NVD
Exploit chance
39.7%EPSS, 98th percentile
Exploitation
None knownNot on CISA’s or ENISA’s lists
Fixed in
0.0.132langchain +2 more

Description

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

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
None

What an attacker can affect

Confidentiality
High
Integrity
High
Availability
High

Exploit likelihood

39.7%Up 39.6 points since Apr 5, 2023
90%50%10%1%

Affected products

Affected packages

Affected packages
PackageAffectedFixed
langchain
PyPI
through 0.0.131None known
langchain
PyPI
through 0.0.131, plus listed versions
0.0.10.0.100.0.1000.0.1010.0.101rc0
Show 45 moreShow less
0.0.1020.0.102rc00.0.1030.0.1040.0.1050.0.1060.0.1070.0.1080.0.1090.0.110.0.1100.0.1110.0.1120.0.1130.0.1140.0.1150.0.1160.0.1170.0.1180.0.1190.0.120.0.1200.0.1210.0.1220.0.1230.0.1240.0.1250.0.1260.0.1270.0.1280.0.1290.0.130.0.1300.0.140.0.150.0.160.0.170.0.180.0.190.0.20.0.200.0.210.0.220.0.230.0.24
None known
langchain
PyPI
before 0.0.132, plus listed versions
0.0.10.0.100.0.1000.0.1010.0.101rc0
Show 45 moreShow less
0.0.1020.0.102rc00.0.1030.0.1040.0.1050.0.1060.0.1070.0.1080.0.1090.0.110.0.1100.0.1110.0.1120.0.1130.0.1140.0.1150.0.1160.0.1170.0.1180.0.1190.0.120.0.1200.0.1210.0.1220.0.1230.0.1240.0.1250.0.1260.0.1270.0.1280.0.1290.0.130.0.1300.0.1310.0.140.0.150.0.160.0.170.0.180.0.190.0.20.0.200.0.210.0.220.0.23
0.0.132

What each source reports

NVD Score used9.8

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

Record
CVE-2023-29374
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-74
Updated
2026-11-02
CVE List9.8

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

Record
CVE-2023-29374
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-74
Updated
2026-11-02
EUVDEUVD-2023-01189.8

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

Record
EUVD-2023-0118
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-fprp-p869-w6q29.3

LangChain vulnerable to code injection

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

Record
GHSA-fprp-p869-w6q2
CVSS 4.0
9.3 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-74, CWE-94
Updated
2026-11-02
OSV9.8

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

Record
CVE-2023-29374
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Updated
2026-11-02
OSVGHSA-fprp-p869-w6q29.3

LangChain vulnerable to code injection

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

Record
GHSA-fprp-p869-w6q2
CVSS 4.0
9.3 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
CVSS 3.1
9.8 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness
CWE-74, CWE-94
Updated
2026-11-02
OSVPYSEC-2023-18No score

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

Record
PYSEC-2023-18
Updated
2026-11-02

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

References

This page doesn't list everything

Left out here: 165 versions. The JSON record has them.

MoveEnter Open