CVE-2024-10940: langchain-ai langchain-ai/langchain
Vulnerability summary
CVE-2024-10940 is a medium (CVSS 5.3) vulnerability in langchain-ai langchain-ai/langchain. EPSS estimates a 0.40% chance of exploitation in the next 30 days, higher than 32.3% of scored vulnerabilities.
Timeline
- 20-03-2025PublishedVulnerability first disclosed.
- 20-03-2025Last modifiedVulnerability information updated.
Description
A vulnerability in langchain-core versions >=0.1.17,<0.1.53, >=0.2.0,<0.2.43, and >=0.3.0,<0.3.15 allows unauthorized users to read arbitrary files from the host file system. The issue arises from the ability to create langchain_core.prompts.ImagePromptTemplate's (and by extension langchain_core.prompts.ChatPromptTemplate's) with input variables that can read any user-specified path from the server file system. If the outputs of these prompt templates are exposed to the user, either directly or through downstream model outputs, it can lead to the exposure of sensitive information.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · PypiEcosystem advisory · calculated5.3MediumCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- NVDNIST5.3MediumCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
EPSS trend
Probability
0.40%
Chance of exploitation in the next 30 days
Percentile
32%
Versus all other CVEs
30-day change
+0.01 pp
From 0.38% on 19-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Langchain-ai1 product
- langchain-ai/langchain≥ unspecified, < 0.3.15
PyPI1 product
- langchain-core≥ 0.1.17, < 0.1.53 | ≥ 0.2.0, < 0.2.43 | ≥ 0.3.0, < 0.3.15
2 vendors · 2 products