Skip to content

← Public intelligence

PyPI package

langchain

Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.

Open advisories

22 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.

  1. Medium, CVSS 5.1PyPIAmendedPublished

    LangChain: Path traversal and sandbox escape in LangChain file-search middleware and loaders

    CVE-2026-55443 · GHSA-gr75-jv2w-4656

    Affected
    • PyPI langchain <= 1.3.8
    Fixed in
    1.3.9· Vendor fix available
    Issue
    Several LangChain components that resolve filesystem paths or expand search patterns do not consistently confine the resolved path to the intended root directory. Affected behaviors include: a file-search agent middleware that validates a starting directory but not the search pattern or the resolved target of matched files, so glob patterns and symlinks can reach files outside the configured root; prompt- and chain/agent-configuration loaders that accept path fields and resolve them without confining the result to a trusted base or rejecting symlink targets; and path-prefix authorization checks that compare by string prefix without a path-segment boundary, so a sibling path sharing the prefix is accepted. When these components receive path values, search patterns, or workspace contents influenced by an untrusted source — including an LLM acting on untrusted input — the result can be disclosure of files outside the intended boundary. We have no evidence of this behavior being…

    Recommended action: Upgrade to 1.3.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  2. High, CVSS 7.1PyPIAmendedPublished

    LangSmith SDK: Public prompt pull deserializes untrusted manifests without trust boundary warning

    CVE-2026-45134 · GHSA-3644-q5cj-c5c7

    Affected
    • PyPI langchain < 0.3.30
    Fixed in
    0.3.30· Vendor fix available
    Issue
    The LangSmith SDK's prompt pull methods (pullprompt / pullpromptcommit in Python, pullPrompt / pullPromptCommit in JS/TS) fetch and deserialize prompt manifests from the LangSmith Hub. These manifests may contain serialized LangChain objects and model configuration that affect runtime behavior. When pulling a public prompt by owner/name identifier, the manifest content is controlled by an external party, but prior versions of the SDK did not distinguish this from pulling a prompt within the caller's own organization. Prompt manifests can intentionally configure a model with a custom base URL, default headers, model name, or other constructor arguments. These are supported features, but they also mean the prompt contents should be treated as executable configuration rather than plain text. A prompt can also include serialized LangChain Runnable or PromptTemplate objects with attacker-controlled constructor kwargs, or secret references that, if secretsfromenv is enabled,…

    Recommended action: Upgrade to 0.3.30 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  3. Low, CVSS 2.1PyPIAmendedPublished

    Langchain SQL Injection vulnerability

    CVE-2024-8309 · GHSA-45pg-36p6-83v9

    Affected
    • PyPI langchain < 0.2.0
    Fixed in
    0.2.0· Vendor fix available
    Issue
    A vulnerability in the GraphCypherQAChain class of langchain-ai/langchain version 0.2.5 allows for SQL injection through prompt injection. This vulnerability can lead to unauthorized data manipulation, data exfiltration, denial of service (DoS) by deleting all data, breaches in multi-tenant security environments, and data integrity issues. Attackers can create, update, or delete nodes and relationships without proper authorization, extract sensitive data, disrupt services, access data across different tenants, and compromise the integrity of the database.

    Recommended action: Upgrade to 0.2.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  4. High, CVSS 8.4PyPIAmendedPublished

    LangChain pickle deserialization of untrusted data

    CVE-2024-5998 · GHSA-f2jm-rw3h-6phg

    Affected
    • PyPI langchain < 0.2.9
    Fixed in
    0.2.9· Vendor fix available
    Issue
    A vulnerability in the FAISS.deserializefrombytes function of langchain-ai/langchain allows for pickle deserialization of untrusted data. This can lead to the execution of arbitrary commands via the os.system function. The issue affects versions prior to 0.2.4.

    Recommended action: Upgrade to 0.2.9 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)osv.dev (2)github.com (3)Source checked Evidence →
  5. Medium, CVSS 4.2PyPIAmendedPublished

    Denial of service in langchain-community

    CVE-2024-2965 · GHSA-3hjh-jh2h-vrg6

    Affected
    • PyPI langchain < 0.2.5
    Fixed in
    0.2.5· Vendor fix available
    Issue
    Denial of service in SitemapLoader Document Loader in the langchain-community package, affecting versions below 0.2.5. The parsesitemap method, responsible for parsing sitemaps and extracting URLs, lacks a mechanism to prevent infinite recursion when a sitemap URL refers to the current sitemap itself. This oversight allows for the possibility of an infinite loop, leading to a crash by exceeding the maximum recursion depth in Python. This vulnerability can be exploited to occupy server socket/port resources and crash the Python process, impacting the availability of services relying on this functionality.

    Recommended action: Upgrade to 0.2.5 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  6. Medium, CVSS 6.5PyPIAmendedPublished

    langchain vulnerable to path traversal

    CVE-2024-3571 · GHSA-rgp8-pm28-3759

    Affected
    • PyPI langchain < 0.0.353
    Fixed in
    0.0.353· Vendor fix available
    Issue
    langchain-ai/langchain is vulnerable to path traversal due to improper limitation of a pathname to a restricted directory ('Path Traversal') in its LocalFileStore functionality. An attacker can leverage this vulnerability to read or write files anywhere on the filesystem, potentially leading to information disclosure or remote code execution. The issue lies in the handling of file paths in the mset and mget methods, where user-supplied input is not adequately sanitized, allowing directory traversal sequences to reach unintended directories.

    Recommended action: Upgrade to 0.0.353 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  7. UnratedPyPIAmendedPublished

    LangChain directory traversal vulnerability

    CVE-2024-28088 · GHSA-h59x-p739-982c

    Affected
    • PyPI langchain < 0.0.339
    Fixed in
    0.0.339· Vendor fix available
    Issue
    LangChain through 0.1.10 allows ../ directory traversal by an actor who is able to control the final part of the path parameter in a loadchain call. This bypasses the intended behavior of loading configurations only from the hwchase17/langchain-hub GitHub repository. The outcome can be disclosure of an API key for a large language model online service, or remote code execution.

    Recommended action: Upgrade to 0.0.339 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  8. Low, CVSS 3.7PyPIAmendedPublished

    langchain Server-Side Request Forgery vulnerability

    CVE-2024-0243 · GHSA-h9j7-5xvc-qhg5

    Affected
    • PyPI langchain < 0.1.0
    Fixed in
    0.1.0· Vendor fix available
    Issue
    With the following crawler configuration: An attacker in control of the contents of https://example.com could place a malicious HTML file in there with links like "https://example.completely.different/myfile.html" and the crawler would proceed to download that file as well even though preventoutside=True. https://github.com/langchain-ai/langchain/blob/bf0b3cc0b5ade1fb95a5b1b6fa260e99064c2e22/libs/community/langchaincommunity/documentloaders/recursiveurlloader.py#L51-L51 Resolved in https://github.com/langchain-ai/langchain/pull/15559

    Recommended action: Upgrade to 0.1.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)osv.dev (2)github.com (3)Source checked Evidence →
  9. High, CVSS 7.5PyPIAmendedPublished

    Langchain Server-Side Request Forgery vulnerability

    CVE-2023-32786 · GHSA-6h8p-4hx9-w66c

    Affected
    • PyPI langchain < 0.0.329
    Fixed in
    0.0.329· Vendor fix available
    Issue
    In Langchain before 0.0.329, prompt injection allows an attacker to force the service to retrieve data from an arbitrary URL, essentially providing SSRF and potentially injecting content into downstream tasks.

    Recommended action: Upgrade to 0.0.329 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  10. Critical, CVSS 9.8PyPIAmendedPublished

    Langchain SQL Injection vulnerability

    CVE-2023-32785 · GHSA-8h5w-f6q9-wg35

    Affected
    • PyPI langchain < 0.0.247
    Fixed in
    0.0.247· Vendor fix available
    Issue
    In Langchain before 0.0.247, prompt injection allows execution of arbitrary code against the SQL service provided by the chain.

    Recommended action: Upgrade to 0.0.247 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  11. High, CVSS 8.6PyPIAmendedPublished

    LangChain Server Side Request Forgery vulnerability

    CVE-2023-46229 · GHSA-655w-fm8m-m478

    Affected
    • PyPI langchain < 0.0.317
    Fixed in
    0.0.317· Vendor fix available
    Issue
    LangChain before 0.0.317 allows SSRF via documentloaders/recursiveurlloader.py because crawling can proceed from an external server to an internal server.

    Recommended action: Upgrade to 0.0.317 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  12. Critical, CVSS 9.8PyPIAmendedPublished

    Langchain vulnerable to arbitrary code execution via the evaluate function in the numexpr library

    CVE-2023-39631 · GHSA-f73w-4m7g-ch9x

    Affected
    • PyPI langchain < 0.0.308
    Fixed in
    0.0.308· Vendor fix available
    Issue
    An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary code via the evaluate function in the numexpr library. Patches: Released in v.0.0.308. numexpr dependency is optional for langchain.

    Recommended action: Upgrade to 0.0.308 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  13. Critical, CVSS 9.3PyPIAmendedPublished

    langchain vulnerable to arbitrary code execution

    CVE-2023-36281 · GHSA-7gfq-f96f-g85j

    Affected
    • PyPI langchain < 0.0.312
    Fixed in
    0.0.312· Vendor fix available
    Issue
    An issue in langchain v.0.0.171 allows a remote attacker to execute arbitrary code via the via the a json file to the loadprompt parameter. This is related to subclasses or a template.

    Recommended action: Upgrade to 0.0.312 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  14. Critical, CVSS 9.3PyPIAmendedPublished

    LangChain vulnerable to arbitrary code execution

    CVE-2023-38860 · GHSA-fj32-q626-pjjc

    Affected
    • PyPI langchain < 0.0.247
    Fixed in
    0.0.247· Vendor fix available
    Issue
    An issue in LangChain prior to v.0.0.247 allows a remote attacker to execute arbitrary code via the prompt parameter.

    Recommended action: Upgrade to 0.0.247 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  15. Critical, CVSS 9.3PyPIAmendedPublished

    LangChain vulnerable to arbitrary code execution

    CVE-2023-38896 · GHSA-92j5-3459-qgp4

    Affected
    • PyPI langchain < 0.0.236
    Fixed in
    0.0.236· Vendor fix available
    Issue
    An issue in Harrison Chase langchain before version 0.0.236 allows a remote attacker to execute arbitrary code via the frommathprompt and fromcoloredobjectprompt functions.

    Recommended action: Upgrade to 0.0.236 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  16. Critical, CVSS 9.3PyPIAmendedPublished

    LangChain vulnerable to arbitrary code execution

    CVE-2023-39659 · GHSA-prgp-w7vf-ch62

    Affected
    • PyPI langchain < 0.0.325
    Fixed in
    0.0.325· Vendor fix available
    Issue
    An issue in langchain langchain-ai before version 0.0.325 allows a remote attacker to execute arbitrary code via a crafted script to the PythonAstREPLTool.run component.

    Recommended action: Upgrade to 0.0.325 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  17. Critical, CVSS 9.3PyPIAmendedPublished

    langchain Code Injection vulnerability

    CVE-2023-36095 · GHSA-gwqq-6vq7-5j86

    Affected
    • PyPI langchain < 0.0.236
    Fixed in
    0.0.236· Vendor fix available
    Issue
    An issue in Harrison Chase langchain allows an attacker to execute arbitrary code via the PALChain,frommathprompt(llm).run in the python exec method.

    Recommended action: Upgrade to 0.0.236 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  18. High, CVSS 8.7PyPIAmendedPublished

    langchain SQL Injection vulnerability

    CVE-2023-36189 · GHSA-7q94-qpjr-xpgm

    Affected
    • PyPI langchain < 0.0.247
    Fixed in
    0.0.247· Vendor fix available
    Issue
    SQL injection vulnerability in langchain allows a remote attacker to obtain sensitive information via the SQLDatabaseChain component.

    Recommended action: Upgrade to 0.0.247 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  19. Critical, CVSS 9.8PyPIAmendedPublished

    langchain vulnerable to arbitrary code execution

    CVE-2023-36188 · GHSA-57fc-8q82-gfp3

    Affected
    • PyPI langchain < 0.0.247
    Fixed in
    0.0.247· Vendor fix available
    Issue
    An issue in langchain allows a remote attacker to execute arbitrary code via the PALChain parameter in the Python exec method.

    Recommended action: Upgrade to 0.0.247 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  20. Critical, CVSS 9.3PyPIAmendedPublished

    langchain arbitrary code execution vulnerability

    CVE-2023-36258 · GHSA-2qmj-7962-cjq8

    Affected
    • PyPI langchain < 0.0.247
    Fixed in
    0.0.247· Vendor fix available
    Issue
    An issue in langchain allows an attacker to execute arbitrary code via the PALChain in the python exec method.

    Recommended action: Upgrade to 0.0.247 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  21. Critical, CVSS 9.3PyPIAmendedPublished

    Langchain vulnerable to arbitrary code execution

    CVE-2023-34541 · GHSA-6643-h7h5-x9wh

    Affected
    • PyPI langchain < 0.0.247
    Fixed in
    0.0.247· Vendor fix available
    Issue
    Langchain 0.0.171 is vulnerable to Arbitrary code execution in loadprompt.

    Recommended action: Upgrade to 0.0.247 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →
  22. Critical, CVSS 9.3PyPIAmendedPublished

    Langchain OS Command Injection vulnerability

    CVE-2023-34540 · GHSA-x32c-59v5-h7fg

    Affected
    • PyPI langchain < 0.0.225
    Fixed in
    0.0.225· Vendor fix available
    Issue
    Langchain before v0.0.225 was discovered to contain a remote code execution (RCE) vulnerability in the component JiraAPIWrapper (aka the JIRA API wrapper). This vulnerability allows attackers to execute arbitrary code via crafted input. As noted in the "releases/tag" reference, a fix is available.

    Recommended action: Upgrade to 0.0.225 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.

    Sources:osv.dev (1)github.com (2)Source checked Evidence →