CVE-2024-10940 Details
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.
A vulnerability exists in langchain-core versions 0.1.17 prior to 0.1.53, 0.2.0 prior to 0.2.43, and 0.3.0 prior to 0.3.15. It allows unauthorized users to read arbitrary files from the host file system. This issue arises from the ability to create ImagePromptTemplate (and, by extension, ChatPromptTemplate) instances with input variables that can access any user-specified file path on the server. If the outputs of these prompt templates are exposed to users, either directly or through downstream model outputs, it can result in the leakage of sensitive information.
Users can upgrade to langchain-core versions 0.3.15, 0.2.43, or 0.1.53 to address this vulnerability.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Mar 20, 2025CISA-ADP
Assessed Mar 20, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68 | [email protected] | Source CodeVendor |
| https://huntr.com/bounties/be1ee1cb-2147-4ff4-a57b-b6045271cf27 | [email protected] | ExploitTechnical Description |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-497 | Exposure of Sensitive System Information to an Unauthorized Control Sphere | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| langchain-core | All versions |
CPE
Remediation
| |
Change History
3 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Mar 20, 2025 | New CVE Received | [email protected] |
Volerion