PT-2025-12081 · Unknown · Langchain-Core
Published
2025-03-20
·
Updated
2025-03-22
·
CVE-2024-10940
CVSS v3.1
5.3
Medium
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Name of the Vulnerable Software and Affected Versions
langchain-core versions 0.1.17 through 0.1.52
langchain-core versions 0.2.0 through 0.2.42
langchain-core versions 0.3.0 through 0.3.14
Description
A vulnerability allows unauthorized users to read arbitrary files from the host file system. This issue arises from the ability to create
langchain core.prompts.ImagePromptTemplate and langchain core.prompts.ChatPromptTemplate 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, it can lead to the exposure of sensitive information.Recommendations
For versions 0.1.17 through 0.1.52, consider restricting access to
langchain core.prompts.ImagePromptTemplate and langchain core.prompts.ChatPromptTemplate to prevent unauthorized file reading.
For versions 0.2.0 through 0.2.42, consider restricting access to langchain core.prompts.ImagePromptTemplate and langchain core.prompts.ChatPromptTemplate to prevent unauthorized file reading.
For versions 0.3.0 through 0.3.14, consider restricting access to langchain core.prompts.ImagePromptTemplate and langchain core.prompts.ChatPromptTemplate to prevent unauthorized file reading.
As a temporary workaround, consider disabling the creation of langchain core.prompts.ImagePromptTemplate and langchain core.prompts.ChatPromptTemplate with input variables until a patch is available.Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Langchain-Core