Exposure of Sensitive System Information via ImagePromptTemplate in langchain-ai/langchain (langchain-ai langchain-ai/langchain)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.40 % Β· percentile 34 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- @huntr_ai
- NVD status
- Deferred
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.
Weaknesses (CWE)
- CWE-497 β Exposure of Sensitive System Information to an Unauthorized Control Sphere
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.0 | MEDIUM 5.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N | @huntr_ai |
| CVSS 3.0 | MEDIUM 5.3 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N | NVD Β· security@huntr.dev (Secondary) |
Advisories
- GHSA-5chr-fjjv-38qv β langchain-core allows unauthorized users to read arbitrary files from the host file system
- PYSEC-2026-1517 β langchain-core allows unauthorized users to read arbitrary files from the host file system
European references
- ENISA EUVD Β· EUVD-2025-7069
- GCVE Β· GCVE-0-2024-10940
Affected products
| Product | Versions |
|---|---|
| langchain-ai Β· langchain-ai/langchain | affected unspecified < 0.3.15 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST β attribution requested |
| ENISA EUVD | ENISA β reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain β this product uses data from the NVD API but is not endorsed or certified by the NVD |