Skip to content
Fencer Vulns
medium 5.3

CVE-2024-10940 json

Exposure of Sensitive System Information via ImagePromptTemplate in langchain-ai/langchain

published 2025-03-20 19 mo ago modified 2026-07-07 4 mo ago also GHSA-5chr-fjjv-38qv , PYSEC-2026-1517 , EUVD-2025-7069

cvss
5.3
version 3.0, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.4%
EPSS 0.4% chance of exploitation in 30 days, percentile 34%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi langchain-core 0.1.53, 0.2.43, 0.3.15
  • langchain-ai langchain-ai/langchain 0.3.15

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2024-10940 updated cvss 5.3

langchain-core: Exposure of Sensitive System Information via ImagePromptTemplate in langchain-ai/langchain

  • Red Hat OpenShift Lightspeed openshift-lightspeed-tech-preview/lightspeed-service-api-rhel9 Red Hat Enterprise Linux AI (RHEL AI) rhelai1/bootc-amd-rhel9, rhelai1/bootc-intel-rhel9, rhelai1/bootc-nvidia-rhel9, rhelai1/bootc-azure-amd-rhel9, rhelai1/instructlab-amd-rhel9, rhelai1/bootc-aws-nvidia-rhel9, +5 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
Proof of concept is public
Automatable
yes
Technical impact
partial
Assessed
19 mo ago

Exploit prediction

0.40% chance of exploitation in the next 30 days, higher than 34% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.0 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
GitHub 3.0 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
OSV 3.0 5.3 CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Affected packages

ecosystem package affected fixed in
pypi langchain-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

Affected products

  • langchain-ai langchain-ai/langchain

Classification

Weakness
  • CWE-497 Exposure of Sensitive System Information to an Unauthorized Control Sphere

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.