Vulnerabilities

CVE-2024-10940

Medium 5.3 CVSS 3.0

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.

Description as published by the source, in English.

Key facts

Published
2025-03-20
Last modified
2026-06-17
Assigned by
security@huntr.dev
CVSS vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Scored by
security@huntr.dev
Probability of exploitation
0.4 % higher than 29 % of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15
Fix available
Not registered in the sources

Affected products

Vendor Product Versions Status
langchain-core (PyPI) ≥ 0.1.17, < 0.1.53 Affected
langchain-core (PyPI) ≥ 0.2.0, < 0.2.43 Affected
langchain-core (PyPI) ≥ 0.3.0, < 0.3.15 Affected

Weakness type

Attack techniques

Derived through the weakness type: CVE to CWE to CAPEC to ATT&CK. This shows which techniques the weakness class is historically used for. It does not assert that this vulnerability has been exploited that way.

  • T1614: System Location Discovery discovery

References

Does this affect you?

A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.

Check your asset list Browse all vulnerabilities