CVE-2024-10940
Python vulnerability analysis and mitigation

Overview

A vulnerability has been identified in langchain-core versions >=0.1.17,<0.1.53, >=0.2.0,<0.2.43, and >=0.3.0,<0.3.15 that allows unauthorized users to read arbitrary files from the host file system. The vulnerability was discovered and reported through huntr.dev, and has been assigned CVE-2024-10940 (NVD).

Technical details

The vulnerability stems 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. When 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. The vulnerability has been assigned a CVSS v3.0 base score of 5.3 (Medium) with the vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N (NVD).

Impact

The vulnerability allows unauthorized users to read arbitrary files from the host file system, potentially exposing sensitive information. This could lead to the disclosure of confidential data stored on the server where the langchain-core application is running (NVD).

Exploitability

The vulnerability can be exploited by creating ImagePromptTemplate instances with specifically crafted input variables that target sensitive files on the host system. No special privileges or user interaction is required for exploitation, making it relatively straightforward to exploit (NVD).

Mitigation and workarounds

The vulnerability has been patched in the latest versions of langchain-core. The fix involves removing the ability to load images from local file paths, requiring users to specify images by URL instead. Users should upgrade to versions >=0.1.53, >=0.2.43, or >=0.3.15 depending on their major version (Github Commit).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-48169HIGH8.8
  • Python logoPython
  • praisonai-platform
NoYesAug 07, 2026
CVE-2026-48813HIGH8.7
  • Python logoPython
  • flawfinder
NoYesAug 11, 2026
CVE-2026-48804HIGH7.5
  • Python logoPython
  • python311-python-socketio
NoYesAug 11, 2026
CVE-2026-48809HIGH7.5
  • Python logoPython
  • python313-python-engineio
NoYesAug 11, 2026
CVE-2026-48802HIGH7.5
  • Python logoPython
  • python311-python-engineio
NoYesAug 11, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management