CVE-2025-8709
Python vulnerability analysis and mitigation

Overview

A SQL injection vulnerability (CVE-2025-8709) was discovered in the langchain-ai/langchain repository, specifically affecting the LangGraph's SQLite store implementation version langgraph-checkpoint-sqlite 2.0.10. The vulnerability was disclosed on October 26, 2025, and received a CVSS v3.0 base score of 7.3 (High) (NVD, RedHat).

Technical details

The vulnerability arises from improper handling of filter operators ($eq, $ne, $gt, $lt, $gte, $lte) in the getfiltercondition() function where direct string concatenation is used without proper parameterization. The JSON key portion of the jsonextract() path is directly concatenated into SQL statements without sanitization, allowing SQL query manipulation. The issue is classified as CWE-89 (SQL Injection) with a CVSS vector string of CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:C/C:H/I:L/A:N (RedHat).

Impact

This vulnerability enables attackers to inject arbitrary SQL, leading to unauthorized access to all documents, data exfiltration of sensitive fields such as passwords and API keys, and complete bypass of application-level security filters. While it enables full data exposure and access-control bypass within the SQLite store, it does not lead to direct remote code execution or full system compromise (RedHat).

Mitigation and workarounds

Safe remediation requires eliminating runtime string concatenation of keys by either binding the entire JSON path as a parameter (e.g., jsonextract(value, ?) with a bound f'$.{key}'), or mapping incoming filter keys to a server-side whitelist of trusted JSON paths. Additionally, it is recommended to validate keys with a strict pattern (e.g., ^[A-Za-z0-9.-]+$) and add unit/fuzz tests that assert malicious keys/values cannot alter generated SQL (RedHat).

Additional resources


SourceThis report was generated using AI

Related Python vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-61385CRITICAL9.6
  • PythonPython
  • pg8000
NoYesOct 27, 2025
CVE-2025-62727HIGH7.5
  • PythonPython
  • starlette
NoYesOct 28, 2025
CVE-2025-8709HIGH7.3
  • PythonPython
  • langgraph-checkpoint-sqlite
NoYesOct 26, 2025
CVE-2025-62708MEDIUM6.6
  • PythonPython
  • nemo
NoYesOct 22, 2025
CVE-2025-40843MEDIUM5.9
  • PythonPython
  • codechecker
NoYesOct 28, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management