Vulnerability in Langchain-Ai Langchain-Ai/langchain

CVE-2024-10940

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.

Published · last modified .

CVSS v3 metric

CVSS v3 base score 5.3 (Medium). Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N.

EPSS exploit prediction

EPSS: 0.004 (30.3th percentile), scored .

Very low probability of exploitation in the next 30 days; routine patching cadence is appropriate. 30th percentile — 30.3% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2024-10940: held from 0.004 to 0.004.

EPSS over last 30 days · oldest: 0.004 · newest: 0.004 · change: +0.000

Affected products

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2024-10940?
CVE-2024-10940 is a medium-severity vulnerability in Langchain-Ai Langchain-Ai/langchain, classified under Exposure of Sensitive System Information to an Unauthorized Control Sphere. CVSS score: 5.3/10. Published 2025-03-20.
How severe is CVE-2024-10940?
Medium severity. CVSS v3 base score is 5.3 out of 10.