Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. langchain-core
  4. ›
  5. CVE-2024-10940

CVE-2024-10940: langchain-core allows unauthorized users to read arbitrary files from the host file system

March 20, 2025 (updated March 21, 2025)

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.

References

  • github.com/advisories/GHSA-5chr-fjjv-38qv
  • github.com/langchain-ai/langchain
  • github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68
  • huntr.com/bounties/be1ee1cb-2147-4ff4-a57b-b6045271cf27
  • nvd.nist.gov/vuln/detail/CVE-2024-10940

Code Behaviors & Features

Detect and mitigate CVE-2024-10940 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 0.1.17 before 0.1.53, all versions starting from 0.2.0 before 0.2.43, all versions starting from 0.3.0 before 0.3.15

Fixed versions

  • 0.1.53
  • 0.2.43
  • 0.3.15

Solution

Upgrade to versions 0.1.53, 0.2.43, 0.3.15 or above.

Impact 5.3 MEDIUM

CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-497: Exposure of Sensitive System Information to an Unauthorized Control Sphere

Source file

pypi/langchain-core/CVE-2024-10940.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:39 +0000.