CVE-2024-27444: Langchain experimental LangChain Experimental Vulnerable To Arbitrary Vulnerability

CRITICAL
Advisory Identifier: GHSA-v8vj-cv27-hjv8
CVSS 9.8
CWE-749
Published
Advisory Summary

CVE-2024-27444 is a CRITICAL (CVSS 9.8) langchain experimental vulnerable to arbitrary vulnerability (CWE-749: Exposed Dangerous Method or Function) affecting Langchain experimental libraries in the PyPI ecosystem. The issue involves langchain experimental vulnerable to arbitrary code execution. Remediation is available by upgrading affected packages to version 0.0.52.

CVE-2024-27444 at a Glance

CVE Identifier CVE-2024-27444
GHSA Identifier GHSA-v8vj-cv27-hjv8
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-749: Exposed Dangerous Method or Function
Affected Product Langchain experimental
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-27444

To remediate this vulnerability, upgrade all affected Langchain experimental dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

langchain-experimental fixed: 0.0.52
pip install langchain-experimental>=0.0.52
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show langchain-experimental

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-27444, inspect your installed packages using pip:

pip show langchain-experimental

Analyze the terminal output to locate any version of Langchain experimental in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.52), your application is affected.

Note: The pip show langchain-experimental command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-749: Exposed Dangerous Method or Function, where the product provides an applications programming interface (api) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted. In Langchain experimental, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

langchain_experimental (aka LangChain Experimental) before 0.0.52, part of LangChain before 0.1.8, allows an attacker to bypass the CVE-2023-44467 fix and execute arbitrary code via the `__import__`, `__subclasses__`, `__builtins__`, `__globals__`, `__getattribute__`, `__bases__`, `__mro__`, or `__base__` attribute in Python code. These are not prohibited by `pal_chain/base.py`.

CVE-2024-27444 Affected Langchain experimental Versions

1 component(s)
Fixed Versions:
0.0.52
Product / Package Ecosystem Affected Versions Fixed Version
langchain-experimental
PyPI
< 0.0.52
0.0.52

References

Frequently Asked Questions

What is CVE-2024-27444?
CVE-2024-27444 is a security vulnerability in Langchain experimental involving LangChain Experimental vulnerable to arbitrary code execution under CWE-749: Exposed Dangerous Method or Function.
Which Langchain experimental versions are affected?
Affected versions include releases prior to 0.0.52 across affected packages: langchain-experimental.
What version fixes CVE-2024-27444?
Upgrading to 0.0.52 (or the latest patched release for your respective branch) resolves the vulnerability.
Is langchain-experimental affected?
Yes, langchain-experimental is affected in releases prior to 0.0.52. Upgrade your dependency to 0.0.52 or later.
What is the CVSS score of CVE-2024-27444?
CVE-2024-27444 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-27444?
CVE-2024-27444 is classified under CWE-749: Exposed Dangerous Method or Function (The product provides an Applications Programming Interface (API) or similar interface for interaction with external actors, but the interface includes a dangerous method or function that is not properly restricted.).
How can I check PyPI dependencies for CVE-2024-27444?
Run the dependency tree command: 'pip show langchain-experimental'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-v8vj-cv27-hjv8",
  "modified" : "2024-08-06T18:35:21Z",
  "published" : "2024-02-26T18:30:31Z",
  "aliases" : [ "CVE-2024-27444" ],
  "summary" : "LangChain Experimental vulnerable to arbitrary code execution",
  "details" : "langchain_experimental (aka LangChain Experimental) before 0.0.52, part of LangChain before 0.1.8, allows an attacker to bypass the CVE-2023-44467 fix and execute arbitrary code via the `__import__`, `__subclasses__`, `__builtins__`, `__globals__`, `__getattribute__`, `__bases__`, `__mro__`, or `__base__` attribute in Python code. These are not prohibited by `pal_chain/base.py`.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "langchain-experimental"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.52"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-27444"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/langchain-ai/langchain/commit/de9a6cdf163ed00adaf2e559203ed0a9ca2f1de7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/langchain-ai/langchain"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-749" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-26T21:00:12Z",
    "nvd_published_at" : "2024-02-26T16:28:00Z"
  }
}