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

CVE-2023-32785: Langchain SQL Injection vulnerability

October 21, 2023 (updated October 27, 2026)

In Langchain before 0.0.247, prompt injection allows execution of arbitrary code against the SQL service provided by the chain.

References

  • gist.github.com/rharang/9c58d39db8c01db5b7c888e467c0533f
  • github.com/advisories/GHSA-8h5w-f6q9-wg35
  • github.com/langchain-ai/langchain/issues/5923
  • github.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2026-372.yaml
  • nvd.nist.gov/vuln/detail/CVE-2023-32785
  • pypi.org/project/langchain

Code Behaviors & Features

Detect and mitigate CVE-2023-32785 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.247

Fixed versions

  • 0.0.247

Solution

Upgrade to version 0.0.247 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-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Source file

pypi/langchain/CVE-2023-32785.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:53 +0000.