Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. langchain
  4. ›
  5. CVE-2023-38896

CVE-2023-38896: LangChain vulnerable to arbitrary code execution

August 15, 2023 (updated September 27, 2024)

An issue in Harrison Chase langchain before version 0.0.236 allows a remote attacker to execute arbitrary code via the from_math_prompt and from_colored_object_prompt functions.

References

  • github.com/advisories/GHSA-92j5-3459-qgp4
  • github.com/hwchase17/langchain/issues/5872
  • github.com/hwchase17/langchain/pull/6003
  • github.com/langchain-ai/langchain
  • github.com/langchain-ai/langchain/commit/8ba9835b925473655914f63822775679e03ea137
  • github.com/langchain-ai/langchain/commit/e294ba475a355feb95003ed8f1a2b99942509a9e
  • github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2023-146.yaml
  • nvd.nist.gov/vuln/detail/CVE-2023-38896
  • twitter.com/llm_sec/status/1668711587287375876

Code Behaviors & Features

Detect and mitigate CVE-2023-38896 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 0.0.236

Fixed versions

  • 0.0.236

Solution

Upgrade to version 0.0.236 or above.

Impact 9.8 CRITICAL

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

Learn more about CVSS

Weakness

  • CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/langchain/CVE-2023-38896.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sun, 08 Nov 2026 00:15:57 +0000.