← Vulnerability feed

Vulnerability record · CVE-2023-39631 · published 1 September 2023

CVE-2023-39631: Langchain code injection vulnerability

Langchain · Langchain

An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary code via the evaluate function in the numexpr library.

9.8 CVSS 3.1 Critical EPSS 1.6% · top 25.2% CWE-94 · Code injection
9.8CVSS 3.1 base score
1.6%EPSS exploitation probability, 30 days
NoNot in CISA KEV
1Affected product versions listed by NVD
4References, 4 tagged exploit
17 Jun 2026Last modified by NVD

Description

An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary code via the evaluate function in the numexpr library.

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected products

1 vulnerable configurations from NVD's CPE data, grouped by vendor and product.

References

LinkTags
https://github.com/langchain-ai/langchain/issues/8363 ExploitIssue TrackingPatchThird Party Advisory
https://github.com/pydata/numexpr/issues/442 ExploitIssue TrackingPatchThird Party Advisory
https://github.com/langchain-ai/langchain/issues/8363 ExploitIssue TrackingPatchThird Party Advisory
https://github.com/pydata/numexpr/issues/442 ExploitIssue TrackingPatchThird Party Advisory

Track CVE-2023-39631 inside VULONE

Watch it alongside the ransomware crews, C2 infrastructure and forum chatter that reference it, query it through the API and pull it into your SIEM over TAXII.

Start free Open in platform

Related vulnerabilities

Same products first, then exploited flaws of the same weakness class.

10.0CVE-2025-2828Langchain server-side request forgery (ssrf) vulnerabilityA Server-Side Request Forgery (SSRF) vulnerability exists in the RequestsToolkit component of the langchain-community package (specifically, langchai…EPSS 21%9.8CVE-2024-8309Langchain sql injection vulnerabilityA vulnerability in the GraphCypherQAChain class of langchain-ai/langchain version 0.2.5 allows for SQL injection through prompt injection. This vulne…EPSS 14%9.8CVE-2024-7042Langchain sql injection vulnerabilityA vulnerability in the GraphCypherQAChain class of langchain-ai/langchainjs versions 0.2.5 and all versions with this class allows for prompt injecti…EPSS 0.31%9.8CVE-2024-2057Langchain server-side request forgery (ssrf) vulnerabilityA vulnerability was found in LangChain langchain_community 0.0.26. It has been classified as critical. Affected is the function load_local in the lib…EPSS 0.58%9.8CVE-2023-36281Langchain code injection vulnerabilityAn issue in langchain v.0.0.171 allows a remote attacker to execute arbitrary code via a JSON file to load_prompt. This is related to __subclasses__ …EPSS 3.4%9.8CVE-2023-38896Langchain injection vulnerabilityAn issue in Harrison Chase langchain v.0.0.194 and before allows a remote attacker to execute arbitrary code via the from_math_prompt and from_colore…EPSS 1.8%9.8CVE-2023-39659Langchain injection vulnerabilityAn issue in langchain langchain-ai v.0.0.232 and before allows a remote attacker to execute arbitrary code via a crafted script to the PythonAstREPLT…EPSS 1.5%9.8CVE-2023-38860Langchain code injection vulnerabilityAn issue in LangChain v.0.0.231 allows a remote attacker to execute arbitrary code via the prompt parameter.EPSS 1.4%

Source: NIST National Vulnerability Database (record CVE-2023-39631), CISA KEV, FIRST EPSS (scores of 2026-09-27). This page is refreshed as NVD updates the record.