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
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-10940
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-10940
github.com
https://github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68
huntr.com
https://huntr.com/bounties/be1ee1cb-2147-4ff4-a57b-b6045271cf27
More from langchain-ai/langchain
10.0
CVE-2025-2828
SSRF Vulnerability in RequestsToolkit 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
7.3
CVE-2025-8709
SQL Injection in langchain-ai/langchain
