CVE-2024-10940

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

Published Mar 20, 2025 CVSS 3.0 · 5.3 Medium EPSS < 1% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
EUVD EUVD EUVD-2025-7069 langchain-core allows unauthorized users to read arbitrary files from the host file system
Github GHSA Github GHSA GHSA-5chr-fjjv-38qv langchain-core allows unauthorized users to read arbitrary files from the host file system
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title Exposure of Sensitive System Information via ImagePromptTemplate in langchain-ai/langchain
Weaknesses CWE-497
References
Metrics cvssV3_0

{'score': 5.3, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
@huntr_ai
Published
Updated
Mar 20, 2025, 7:02 PM
Reserved
Nov 6, 2024, 7:50 PM
Status
Deferred
Published
Mar 20, 2025, 10:15 AM
Modified
Jun 17, 2026, 6:56 AM
Severity
Moderate
Public date
Mar 20, 2025, 10:08 AM