CVE-2024-10940
Exposure of Sensitive System Information via ImagePromptTemplate in langchain-ai/langchain
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- Low
- Integrity
- None
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.3
Exposure of Sensitive System Information via ImagePromptTemplate in langchain-ai/langchain
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.
- Record
CVE-2024-10940- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-497
- Updated
- 2026-11-02
EUVDEUVD-2025-7069
5.3
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.
- Record
EUVD-2025-7069- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-5chr-fjjv-38qv
5.3
langchain-core allows unauthorized users to read arbitrary files from the host file system
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.
- Record
GHSA-5chr-fjjv-38qv- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-497
- Updated
- 2026-11-02
NVD
5.3
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.
- Record
CVE-2024-10940- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-497
- Updated
- 2026-11-02
OSV
5.3
Exposure of Sensitive System Information via ImagePromptTemplate in langchain-ai/langchain
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.
- Record
CVE-2024-10940- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-497
- Updated
- 2026-11-02
OSVGHSA-5chr-fjjv-38qv
5.3
langchain-core allows unauthorized users to read arbitrary files from the host file system
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.
- Record
GHSA-5chr-fjjv-38qv- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Weakness
- CWE-497
- Updated
- 2026-11-02
OSVPYSEC-2026-1517
5.3
langchain-core allows unauthorized users to read arbitrary files from the host file system
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.
- Record
PYSEC-2026-1517- CVSS 3.0
- 5.3 Medium
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
langchain-corePyPI |
0.1.17 up to 0.1.53 | 0.1.53 |
langchain-corePyPI |
0.2.0 up to 0.2.43 | 0.2.43 |
langchain-corePyPI |
0.3.0 up to 0.3.15 | 0.3.15 |
langchain-corePyPI |
0.1.17 up to 0.1.53, plus listed versions 0.1.180.1.190.1.200.1.210.1.22 Show 33 moreShow less0.1.230.1.240.1.250.1.260.1.270.1.280.1.290.1.300.1.310.1.320.1.330.1.33rc10.1.340.1.350.1.360.1.370.1.380.1.390.1.400.1.410.1.420.1.42rc10.1.430.1.440.1.450.1.460.1.470.1.47rc10.1.480.1.490.1.500.1.510.1.52 |
0.1.53 |
langchain-corePyPI |
0.2.0 up to 0.2.43, plus listed versions 0.2.10.2.100.2.110.2.120.2.13 Show 38 moreShow less0.2.150.2.160.2.170.2.180.2.190.2.20.2.200.2.210.2.220.2.230.2.240.2.250.2.260.2.270.2.280.2.290.2.29rc10.2.2rc10.2.30.2.300.2.310.2.320.2.330.2.340.2.350.2.360.2.370.2.380.2.390.2.40.2.400.2.410.2.420.2.50.2.60.2.70.2.80.2.9 |
0.2.43 |
langchain-corePyPI |
0.3.0 up to 0.3.15, plus listed versions 0.3.10.3.100.3.110.3.120.3.13 Show 9 moreShow less0.3.140.3.20.3.30.3.40.3.50.3.60.3.70.3.80.3.9 |
0.3.15 |
langchain-corePyPI |
0.1.17 up to 0.1.53, 0.2.0 up to 0.2.43, 0.3.0 up to 0.3.15, plus listed versions 0.1.180.1.190.1.200.1.210.1.22 Show 45 moreShow less0.1.230.1.240.1.250.1.260.1.270.1.280.1.290.1.300.1.310.1.320.1.330.1.33rc10.1.340.1.350.1.360.1.370.1.380.1.390.1.400.1.410.1.420.1.42rc10.1.430.1.440.1.450.1.460.1.470.1.47rc10.1.480.1.490.1.500.1.510.1.520.2.10.2.100.2.110.2.120.2.130.2.150.2.160.2.170.2.180.2.190.2.20.2.20 |
0.1.530.2.430.3.15 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-10940 is a medium vulnerability (CVSS 5.3) in Langchain-ai Langchain-ai/langchain, published March 20, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.40%, the 34th percentile. Fixed in langchain-core 0.1.53.
References
huntr.com/bounties/be1ee1cb-2147-4ff4-a57b-b6045271cf27
github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68
nvd.nist.gov/vuln/detail/CVE-2024-10940
github.com/langchain-ai/langchain/commit/7d481f10102f43559cc57bcad7eba291067939ee
github.com/langchain-ai/langchain/commit/e711034713259ae448981bc0fd1d7a5671499c31
github.com/advisories/GHSA-5chr-fjjv-38qv
github.com/CVEProject/cvelistV5/tree/main/cves/2024/10xxx/CVE-2024-10940.json
github.com/langchain-ai/langchain
pypi.org/project/langchain-core
Left out here: 45 versions. The JSON record has them.