cve.bz

CVE-2024-10940 langchain-ai langchain-ai/langchain

5.3 mediumEPSS 0.4%Fix available

Medium (5.3) in langchain-ai langchain-ai/langchain. EPSS 0.4% estimated probability of exploitation activity in the next 30 days. Fixed in langchain-core 0.1.53, 0.2.43, 0.3.15.

On this page
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.

Severity

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
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 35th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: partial, assessed 2025-03-20. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-497 Exposure of Sensitive System Information to an Unauthorized Control Sphere
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

  • langchain-core (PyPI): fixed in 0.1.53, 0.2.43, 0.3.15

Ask an AI about this CVE

Show the promptExplain CVE-2024-10940 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-10940?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-10940?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-10940 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
langchain-ai/langchainbefore 0.3.15

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-5chr-fjjv-38qvPyPIlangchain-core>=0.1.17 <0.1.530.1.53
GHSA-5chr-fjjv-38qvPyPIlangchain-core>=0.2.0 <0.2.430.2.43
GHSA-5chr-fjjv-38qvPyPIlangchain-core>=0.3.0 <0.3.150.3.15
PYSEC-2026-1517PyPIlangchain-core>=0.1.17 <0.1.53
>=0.2.0 <0.2.43
>=0.3.0 <0.3.15
0.1.53, 0.2.43, 0.3.15

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
OpenShift Lightspeedopenshift-lightspeed-tech-preview/lightspeed-service-api-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-amd-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-aws-nvidia-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-azure-amd-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-azure-nvidia-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-gcp-nvidia-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-ibm-nvidia-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-intel-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/bootc-nvidia-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/instructlab-amd-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/instructlab-intel-rhel9Not affected
Red Hat Enterprise Linux AI (RHEL AI)rhelai1/instructlab-nvidia-rhel9Not affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-10940.

Attack patterns (CAPEC)

  • CAPEC-170 Web Application Fingerprinting Likelihood: High · Severity: Low
  • CAPEC-694 System Location Discovery Likelihood: High · Severity: Very Low

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON