Live threats

All CVEs / langchain-ai

CVE-2024-10940langchain-ai/langchain

Medium 5.3 No auth needed

Priority
47
CVSS 3.0
5.3
EPSS
0.6%
probability of exploitation in 30 days · percentile 41
Auth required
No
Published
Mar 20, 2025
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-497
SSVC (CISA)
Exploitation: proof of concept · Automatable: yes · Technical impact: partial
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for langchain-ai/langchain.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
PyPI langchain-core ≥ 0.1.17 < 0.1.53 0.1.53 pip install "langchain-core>=0.1.53"
PyPI langchain-core ≥ 0.2.0 < 0.2.43 0.2.43 pip install "langchain-core>=0.2.43"
PyPI langchain-core ≥ 0.3.0 < 0.3.15 0.3.15 pip install "langchain-core>=0.3.15"
PyPI langchain-core ≥ 0.1.17 < 0.1.53 0.1.53 pip install "langchain-core>=0.1.53"
PyPI langchain-core ≥ 0.2.0 < 0.2.43 0.2.43 pip install "langchain-core>=0.2.43"
PyPI langchain-core ≥ 0.3.0 < 0.3.15 0.3.15 pip install "langchain-core>=0.3.15"

Per OSV / GitHub Advisories (GHSA-5chr-fjjv-38qv, PYSEC-2026-1517). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.