logo

CVE-2024-10940 langchain-core

Package

Manager: pip
Name: langchain-core
Vulnerable Version: >=0.1.17 <0.1.53 || >=0.2.0 <0.2.43 || >=0.3.0 <0.3.15

Severity

Level: Medium

CVSS v3.1: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

EPSS: 0.00042 pctl0.11943

Details

langchain-core allows unauthorized users to read arbitrary files from the host file system 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.

Metadata

Created: 2025-03-20T12:32:41Z
Modified: 2025-05-20T18:18:37Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2025/03/GHSA-5chr-fjjv-38qv/GHSA-5chr-fjjv-38qv.json
CWE IDs: ["CWE-497"]
Alternative ID: GHSA-5chr-fjjv-38qv
Finding: F017
Auto approve: 1