{"schemaVersion":3,"id":"CVE-2024-10940","aliases":["GHSA-5chr-fjjv-38qv","PYSEC-2026-1517"],"status":"published","duplicateOf":null,"title":null,"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.","dates":{"published":"2025-03-20T10:08:48.628Z","modified":"2025-03-20T19:02:58.871Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":5.3,"severity":"medium","version":"3.0","versionLabel":"v3.0","source":"CVE.org","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"3.0","versionLabel":"v3.0","source":"CVE.org","score":5.3,"severity":"medium","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","exploitability":null,"impact":null,"computed":false},{"version":"3.0","versionLabel":"v3.0","source":"OSV · Pypi","score":5.3,"severity":"medium","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","exploitability":10,"impact":2.3,"computed":true},{"version":"3.0","versionLabel":"v3.0","source":"NVD","score":5.3,"severity":"medium","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00396,"percentile":0.32327,"severity":"low","asOf":"2026-10-19T00:00:00.000Z","change":{"pp":0.013999999999999993,"baselineDate":"2026-09-19T00:00:00.000Z","baselineScore":0.00382},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.00382,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.00382,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.00382,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.00382,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.00382,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.00382,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00396,"percentile":0.32327}],"last30":[{"date":"2026-09-19T00:00:00.000Z","score":0.00382,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00388,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00396,"percentile":null},{"date":"2026-10-19T00:00:00.000Z","score":0.00396,"percentile":0.32327}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-497","name":"Exposure of Sensitive System Information to an Unauthorized Control Sphere","description":"The product does not properly prevent sensitive system-level information from being accessed by unauthorized actors who do not have the same level of access to the underlying system as the product does.","type":"weakness","status":"Incomplete","abstraction":"Base","likelihoodOfExploit":null,"url":"https://cwe.mitre.org/data/definitions/497.html"}],"affected":[{"vendor":"langchain-ai","product":"langchain-ai/langchain","name":"langchain-ai/langchain","label":"langchain-ai/langchain","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"≥ unspecified, < 0.3.15","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ unspecified, < 0.3.15","eol":null,"hubHref":"/vendor/langchain-ai/langchain-ailangchain"},{"vendor":"PyPI","product":"langchain-core","name":"langchain-core","label":"langchain-core","ecosystem":"PyPI","cpePart":null,"purl":"pkg:pypi/langchain-core","purlType":"pypi","versions":[{"text":"≥ 0.1.17, < 0.1.53","noFixRecorded":false,"fixedIn":null},{"text":"≥ 0.2.0, < 0.2.43","noFixRecorded":false,"fixedIn":null},{"text":"≥ 0.3.0, < 0.3.15","noFixRecorded":false,"fixedIn":null}],"versionsText":"≥ 0.1.17, < 0.1.53 | ≥ 0.2.0, < 0.2.43 | ≥ 0.3.0, < 0.3.15","eol":null,"hubHref":null}],"affectedCount":2,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://huntr.com/bounties/be1ee1cb-2147-4ff4-a57b-b6045271cf27","label":"huntr.com/bounties/be1ee1cb-2147-4ff4-a57b-b6045271cf27","hostname":"huntr.com","tags":["WEB"]},{"url":"https://github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68","label":"github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68","hostname":"github.com","tags":["WEB"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-10940","label":"nvd.nist.gov/vuln/detail/CVE-2024-10940","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/langchain-ai/langchain/commit/7d481f10102f43559cc57bcad7eba291067939ee","label":"github.com/langchain-ai/langchain/commit/7d481f10102f43559cc57bcad7eba291067939ee","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/langchain-ai/langchain/commit/e711034713259ae448981bc0fd1d7a5671499c31","label":"github.com/langchain-ai/langchain/commit/e711034713259ae448981bc0fd1d7a5671499c31","hostname":"github.com","tags":["WEB"]},{"url":"https://github.com/langchain-ai/langchain","label":"github.com/langchain-ai/langchain","hostname":"github.com","tags":["PACKAGE"]},{"url":"https://pypi.org/project/langchain-core","label":"pypi.org/project/langchain-core","hostname":"pypi.org","tags":["PACKAGE"]},{"url":"https://github.com/advisories/GHSA-5chr-fjjv-38qv","label":"github.com/advisories/GHSA-5chr-fjjv-38qv","hostname":"github.com","tags":["Advisory"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2025-03-20T10:08:48.628Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2025-03-20T19:02:58.871Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":21,"level":"low","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-20T11:53:23.159Z","stale":false,"partial":false}}