Skip to content
HighVulnerability

CVE-2024-10940: langchain-core arbitrary file read through ImagePromptTemplate input variables

Identifier
CVE-2024-10940
Published
Record updated
View JSON
Affected
  • langchain-core >= 0.1.17, < 0.1.53, fixed in 0.1.53, released November 1, 2024, 138 days before disclosure
  • langchain-core >= 0.2.0, < 0.2.43, fixed in 0.2.43, released October 31, 2024, 140 days before disclosure
  • langchain-core >= 0.3.0, < 0.3.15, fixed in 0.3.15, released October 31, 2024, 140 days before disclosure
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.4%

Summary

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 lets unauthorized users read arbitrary files from the host file system. The flaw lies in langchain_core.prompts.ImagePromptTemplate, and by extension ChatPromptTemplate, which can be created with input variables that read any user-specified server path. If the prompt template outputs are exposed to the user, directly or through downstream model outputs, sensitive information can leak.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.