Medium severity · published Mar 20, 2025
CVE-2024-10940
Exposure of Sensitive System Information via ImagePromptTemplate in langchain-ai/langchain
5.3
CVSS
0.4%
EPSS
No
On KEV
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 vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Confidentiality
Low
Integrity
None
Availability
None
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.4% · higher than 34% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
LA
langchain-ai/langchain · langchain-ai
before 0.3.15 · source: vendor
Affected product
LA
langchain-ai/langchain
langchain-ai
More from langchain-ai/langchain
10.0
CVE-2025-2828
SSRF Vulnerability in RequestsToolkit in langchain-ai/langchain
9.8
CVE-2024-8309
SQL Injection in langchain-ai/langchain
7.8
CVE-2024-5998
Deserialization of Untrusted Data in langchain-ai/langchain
7.5
CVE-2025-6985
XXE Vulnerability in langchain-ai/langchain
7.5
CVE-2025-6984
Sensitive Information Disclosure Due to Insecure XML Parsing in langchain-ai/langchain