Skip to main content
← All vulnerabilities
CVE-2024-10940PYSEC-2026-1517GHSA-5CHR-FJJV-38QV

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

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.3.15, 0.1.53, 0.2.43
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Record last updated

Affected versions

  • langchain-ai langchain-ai/langchain

    fixed in 0.3.15

  • langchain-corePyPI

    From 0.1.17 · fixed in 0.1.53; From 0.2.0 · fixed in 0.2.43; From 0.3.0 · fixed in 0.3.15

  • langchain-corePyPI

    From 0.1.17 · fixed in 0.1.53

  • langchain-corePyPI

    From 0.2.0 · fixed in 0.2.43

  • langchain-corePyPI

    From 0.3.0 · fixed in 0.3.15

References 2

huntr.com

GitHub · langchain-ai/langchain