Advisory

PYSEC-2026-372

Also known as: CVE-2023-32785, GHSA-8h5w-f6q9-wg35

Summary

Langchain SQL Injection vulnerability

Details

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

Severity

Critical Basis: CVSS v3 score 9.8, vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2026-06-29 11:50 UTC
Modified
2026-07-01 20:22 UTC

Affected packages and fixes

langchain

PyPI · All systems

Affected

  • introduced 0, fixed 0.0.247 (ecosystem)

Fixed versions

0.0.247

Fix

  • Fixed version 0.0.247
    pip install --upgrade langchain==0.0.247

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences