{"cve":"CVE-2024-10940","nvd":{"published":"2025-03-20T10:15:21.850","modified":"2026-06-17T06:56:44.563","status":"Deferred","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_v4":null,"cvss_v3":{"version":"3.0","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3},"cwes":["CWE-497"],"references":["https://github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68","https://huntr.com/bounties/be1ee1cb-2147-4ff4-a57b-b6045271cf27"],"products":[],"source":"nvd","synced_at":"2026-10-19T22:00:17.429720821+00:00"},"epss":{"cve":"CVE-2024-10940","score":0.00396,"percentile":0.3383,"date":"2026-10-31"},"kev":null,"osv":[{"id":"GHSA-5chr-fjjv-38qv","url":"https://osv.dev/vulnerability/GHSA-5chr-fjjv-38qv","summary":"langchain-core allows unauthorized users to read arbitrary files from the host file system","modified":"2026-07-07T17:56:35.905913395Z","packages":[{"ecosystem":"PyPI","name":"langchain-core","purl":"pkg:pypi/langchain-core","ranges":[">=0.1.17 <0.1.53"],"fixed":["0.1.53"]},{"ecosystem":"PyPI","name":"langchain-core","purl":"pkg:pypi/langchain-core","ranges":[">=0.2.0 <0.2.43"],"fixed":["0.2.43"]},{"ecosystem":"PyPI","name":"langchain-core","purl":"pkg:pypi/langchain-core","ranges":[">=0.3.0 <0.3.15"],"fixed":["0.3.15"]}]},{"id":"PYSEC-2026-1517","url":"https://osv.dev/vulnerability/PYSEC-2026-1517","summary":"langchain-core allows unauthorized users to read arbitrary files from the host file system","modified":"2026-07-07T17:46:47.900377345Z","packages":[{"ecosystem":"PyPI","name":"langchain-core","purl":"pkg:pypi/langchain-core","ranges":[">=0.1.17 <0.1.53",">=0.2.0 <0.2.43",">=0.3.0 <0.3.15"],"fixed":["0.1.53","0.2.43","0.3.15"]}]}],"attribution":["This product uses the NVD API but is not endorsed or certified by the NVD.","EPSS scores: FIRST Exploit Prediction Scoring System, https://www.first.org/epss","Known exploited vulnerabilities: CISA Known Exploited Vulnerabilities Catalog, https://www.cisa.gov/known-exploited-vulnerabilities-catalog","Package advisories: OSV (https://osv.dev), from the GitHub Advisory Database, PyPA, Go, RustSec and other ecosystem databases, under CC-BY 4.0 or CC0","CVE records: the CVE Program's CVE List (https://www.cve.org), under its terms of use (https://www.cve.org/Legal/TermsOfUse). CVE is a registered trademark of The MITRE Corporation; this product is not affiliated with the CVE Program."]}