# CVE-2024-10940: Exposure of Sensitive System Information via ImagePromptTemplate in langchain-ai/langchain

- Severity: Medium 5.3 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.40%, higher than 35% of CVEs (2026-12-01)
- Published: 2025-03-20T10:08:48.628Z
- Modified: 2026-07-07T17:56:35.905Z
- Also known as: GHSA-5chr-fjjv-38qv, PYSEC-2026-1517
- Weaknesses: CWE-497
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: @huntr_ai

## 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.

(As written by CVE List.)

## Affected

- langchain-ai langchain-ai/langchain: from unspecified before 0.3.15
- langchain-core (PyPI): from 0.1.17 before 0.1.53; from 0.2.0 before 0.2.43; from 0.3.0 before 0.3.15

## Every score

- @huntr_ai: 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`
- GitHub: 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`
- PyPA Advisory Database: 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`

## References

- <https://huntr.com/bounties/be1ee1cb-2147-4ff4-a57b-b6045271cf27> (web)
- <https://github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-10940> (advisory)
- <https://github.com/langchain-ai/langchain/commit/7d481f10102f43559cc57bcad7eba291067939ee> (web)
- <https://github.com/langchain-ai/langchain/commit/e711034713259ae448981bc0fd1d7a5671499c31> (web)
- <https://github.com/langchain-ai/langchain> (package)
- <https://pypi.org/project/langchain-core> (package)
- <https://github.com/advisories/GHSA-5chr-fjjv-38qv> (advisory)

## Sources

- CVE List: [CVE-2024-10940](https://www.cve.org/CVERecord?id=CVE-2024-10940), CVE Terms of Use, modified 2025-03-20
- GitHub Advisory Database: [GHSA-5chr-fjjv-38qv](https://github.com/advisories/GHSA-5chr-fjjv-38qv), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2024-10940](https://nvd.nist.gov/vuln/detail/CVE-2024-10940), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1517](https://osv.dev/vulnerability/PYSEC-2026-1517), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2024-10940 · Whole record: https://cve.day/CVE-2024-10940.json · Rebuilt by cve.day 2026-11-25T22:58:52.342Z
