PYSEC-2026-1517

Vulnerability from pysec - Published: 2026-07-07 14:34 - Updated: 2026-07-07 17:24
VLAI
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.

Impacted products
Name purl
langchain-core pkg:pypi/langchain-core

{
  "affected": [
    {
      "package": {
        "ecosystem": "PyPI",
        "name": "langchain-core",
        "purl": "pkg:pypi/langchain-core"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0.1.17"
            },
            {
              "fixed": "0.1.53"
            },
            {
              "introduced": "0.2.0"
            },
            {
              "fixed": "0.2.43"
            },
            {
              "introduced": "0.3.0"
            },
            {
              "fixed": "0.3.15"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ],
      "versions": [
        "0.1.17",
        "0.1.18",
        "0.1.19",
        "0.1.20",
        "0.1.21",
        "0.1.22",
        "0.1.23",
        "0.1.24",
        "0.1.25",
        "0.1.26",
        "0.1.27",
        "0.1.28",
        "0.1.29",
        "0.1.30",
        "0.1.31",
        "0.1.32",
        "0.1.33",
        "0.1.33rc1",
        "0.1.34",
        "0.1.35",
        "0.1.36",
        "0.1.37",
        "0.1.38",
        "0.1.39",
        "0.1.40",
        "0.1.41",
        "0.1.42",
        "0.1.42rc1",
        "0.1.43",
        "0.1.44",
        "0.1.45",
        "0.1.46",
        "0.1.47",
        "0.1.47rc1",
        "0.1.48",
        "0.1.49",
        "0.1.50",
        "0.1.51",
        "0.1.52",
        "0.2.0",
        "0.2.1",
        "0.2.10",
        "0.2.11",
        "0.2.12",
        "0.2.13",
        "0.2.15",
        "0.2.16",
        "0.2.17",
        "0.2.18",
        "0.2.19",
        "0.2.2",
        "0.2.20",
        "0.2.21",
        "0.2.22",
        "0.2.23",
        "0.2.24",
        "0.2.25",
        "0.2.26",
        "0.2.27",
        "0.2.28",
        "0.2.29",
        "0.2.29rc1",
        "0.2.2rc1",
        "0.2.3",
        "0.2.30",
        "0.2.31",
        "0.2.32",
        "0.2.33",
        "0.2.34",
        "0.2.35",
        "0.2.36",
        "0.2.37",
        "0.2.38",
        "0.2.39",
        "0.2.4",
        "0.2.40",
        "0.2.41",
        "0.2.42",
        "0.2.5",
        "0.2.6",
        "0.2.7",
        "0.2.8",
        "0.2.9",
        "0.3.0",
        "0.3.1",
        "0.3.10",
        "0.3.11",
        "0.3.12",
        "0.3.13",
        "0.3.14",
        "0.3.2",
        "0.3.3",
        "0.3.4",
        "0.3.5",
        "0.3.6",
        "0.3.7",
        "0.3.8",
        "0.3.9"
      ]
    }
  ],
  "aliases": [
    "CVE-2024-10940",
    "GHSA-5chr-fjjv-38qv"
  ],
  "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": "PYSEC-2026-1517",
  "modified": "2026-07-07T17:24:27.513564Z",
  "published": "2026-07-07T14:34:52.475462Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-10940"
    },
    {
      "type": "WEB",
      "url": "https://github.com/langchain-ai/langchain/commit/7d481f10102f43559cc57bcad7eba291067939ee"
    },
    {
      "type": "WEB",
      "url": "https://github.com/langchain-ai/langchain/commit/c1e742347f9701aadba8920e4d1f79a636e50b68"
    },
    {
      "type": "WEB",
      "url": "https://github.com/langchain-ai/langchain/commit/e711034713259ae448981bc0fd1d7a5671499c31"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/langchain-ai/langchain"
    },
    {
      "type": "WEB",
      "url": "https://huntr.com/bounties/be1ee1cb-2147-4ff4-a57b-b6045271cf27"
    },
    {
      "type": "PACKAGE",
      "url": "https://pypi.org/project/langchain-core"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/advisories/GHSA-5chr-fjjv-38qv"
    }
  ],
  "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"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…