mediumCVSS 5.3NVD status: Deferred

CVE-2024-10940

LangChain: 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.

ComponentLangChain
Severitymedium (CVSS 5.3)
CVSS vectorCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Published (NVD)2025-03-20
Last modified2026-06-17
Affected versionsnot published yet, see the advisory
Fixed insee the vendor advisory
WeaknessCWE-497
CISA KEVnot listed

NVD 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.

Does CVE-2024-10940 hit the version you run?Paste your docker-compose.yml, requirements.txt or package.json. The scanner checks your pinned versions against this CVE and every other one we track for LangChain.
Check my stack

What to do

  • NVD lists no fixed version yet: follow the vendor advisory below and keep LangChain off the public internet until a fix ships.
  • Do not expose the component's API or UI to the internet without authentication in front of it.

Sources

Other LangChain CVEs

All LangChain CVEs