CVE-2024-10940
March 20, 2025
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.
Affected Packages
https://github.com/langchain-ai/langchain.git (GITHUB):
Affected version(s) >=langchain==0.3.0 <langchain==0.3.15Fix Suggestion:
Update to version langchain==0.3.15https://github.com/langchain-ai/langchain.git (GITHUB):
Affected version(s) >=langchain==0.2.0 <langchain==0.2.43Fix Suggestion:
Update to version langchain==0.2.43langchain-core (PYTHON):
Affected version(s) >=0.3.0 <0.3.15Fix Suggestion:
Update to version 0.3.15langchain-core (PYTHON):
Affected version(s) >=0.2.0 <0.2.43Fix Suggestion:
Update to version 0.2.43langchain-core (PYTHON):
Affected version(s) >=0.1.17 <0.1.53Fix Suggestion:
Update to version 0.1.53Related Resources (6)
Do you need more information?
Contact UsCVSS v4
Base Score:
6.9
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
LOW
Vulnerable System Integrity
NONE
Vulnerable System Availability
NONE
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
5.3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
LOW
Integrity
NONE
Availability
NONE
Weakness Type (CWE)
Exposure of Sensitive System Information to an Unauthorized Control Sphere
EPSS
Base Score:
0.10