ghsa-5chr-fjjv-38qv
Vulnerability from github
Published
2025-03-20 12:32
Modified
2025-03-21 16:43
Severity ?
Summary
langchain-core allows unauthorized users to read arbitrary files from the host file system
Details
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.
{ "affected": [ { "package": { "ecosystem": "PyPI", "name": "langchain-core" }, "ranges": [ { "events": [ { "introduced": "0.1.17" }, { "fixed": "0.1.53" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "langchain-core" }, "ranges": [ { "events": [ { "introduced": "0.2.0" }, { "fixed": "0.2.43" } ], "type": "ECOSYSTEM" } ] }, { "package": { "ecosystem": "PyPI", "name": "langchain-core" }, "ranges": [ { "events": [ { "introduced": "0.3.0" }, { "fixed": "0.3.15" } ], "type": "ECOSYSTEM" } ] } ], "aliases": [ "CVE-2024-10940" ], "database_specific": { "cwe_ids": [ "CWE-497" ], "github_reviewed": true, "github_reviewed_at": "2025-03-21T16:43:25Z", "nvd_published_at": "2025-03-20T10:15:21Z", "severity": "MODERATE" }, "details": "A vulnerability in langchain-core versions \u003e=0.1.17,\u003c0.1.53, \u003e=0.2.0,\u003c0.2.43, and \u003e=0.3.0,\u003c0.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\u0027s (and by extension langchain_core.prompts.ChatPromptTemplate\u0027s) 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.", "id": "GHSA-5chr-fjjv-38qv", "modified": "2025-03-21T16:43:25Z", "published": "2025-03-20T12:32:41Z", "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-10940" }, { "type": "WEB", "url": "https://github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68" }, { "type": "PACKAGE", "url": "https://github.com/langchain-ai/langchain" }, { "type": "WEB", "url": "https://huntr.com/bounties/be1ee1cb-2147-4ff4-a57b-b6045271cf27" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N", "type": "CVSS_V3" } ], "summary": "langchain-core allows unauthorized users to read arbitrary files from the host file system" }
Loading...
Loading...
- Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
- Confirmed: The vulnerability is confirmed from an analyst perspective.
- Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
- Patched: This vulnerability was successfully patched by the user reporting the sighting.
- Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
- Not confirmed: The user expresses doubt about the veracity of the vulnerability.
- Not patched: This vulnerability was not successfully patched by the user reporting the sighting.