AI and data stack advisories

Severe, 6 weeks1496Projects326

1496 severe, 6 weeks · 326 projects

LangChainGHSA-5chr-fjjv-38qv

langchain-core allows unauthorized users to read arbitrary files from the host file system

LangChain

CVE-2024-10940 · Published Mar 20, 2025 · updated Jul 7, 2026

Medium5.3
Fix: upgrade to 0.1.53 or later (3 fixed versions below)
GitHub advisory

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.

Affected versions

PackageAffectedFixed in
langchain-core
PyPI
>= 0.1.17, < 0.1.530.1.53
>= 0.2.0, < 0.2.430.2.43
>= 0.3.0, < 0.3.150.3.15
Details and references

More LangChain advisories

All LangChain