# Critical LangGraph Flaw Chain Enables Remote Code Execution in Self-Hosted AI Agents


## The Threat


Security researchers have uncovered a dangerous vulnerability chain affecting LangGraph, an open-source framework developed by LangChain for building complex, stateful multi-agent AI applications. The flaw allows attackers to achieve complete remote code execution on self-hosted LangGraph deployments by exploiting a combination of SQL injection and unsafe deserialization weaknesses.


The vulnerability chain is particularly concerning because it demonstrates how classic security flaws—thought to be well-understood and mitigated in traditional software—can resurface with heightened impact when embedded in modern AI frameworks that operate with elevated privileges and broad system access. An attacker with access to a vulnerable endpoint can systematically manipulate the application's state management layer to inject and execute arbitrary code, potentially gaining full control of the underlying server and any systems it can reach.


The flaw affects self-hosted deployments using either SQLite or Redis as checkpoint storage mechanisms. Critically, this does not affect LangSmith Deployment, LangChain's managed cloud platform, where the isolation and access controls prevent such exploitation. However, organizations running their own LangGraph instances—a common pattern for security-conscious teams wanting to keep sensitive data on-premises—face immediate risk if they haven't applied the latest patches.


## Severity and Impact


| Aspect | Details |

|--------|---------|

| Primary CVE | CVE-2025-67644, CVE-2026-28277 (chained) |

| CVSS Scores | 7.3 (SQL Injection), 6.8 (Deserialization) |

| Attack Vector | Network |

| Attack Complexity | Low |

| Privileges Required | None |

| User Interaction | None |

| Scope | Unchanged |

| Impact | Complete remote code execution (RCE) |

| Secondary CVE | CVE-2026-27022 (CVSS 6.5 - Query Injection) |


The exploit chain hinges on exploiting the get_state_history() endpoint, which many deployments expose to retrieve historical checkpoint data. The attack unfolds in four distinct steps: first, the attacker crafts a malicious msgpack payload containing instructions for arbitrary code execution; second, they send a specially crafted filter parameter that leverages the SQL injection vulnerability to return a fake checkpoint row with attacker-controlled serialized data; third, when the application processes these results, it deserializes the checkpoint BLOB; and finally, the unsafe deserialization flaw executes the attacker's payload with full runtime privileges.


## Affected Products


LangGraph Components:

  • langgraph versions before 1.0.10
  • langgraph-checkpoint-sqlite versions before 3.0.1
  • @langchain/langgraph-checkpoint-redis versions before 1.0.1

  • Vulnerable Configurations:

  • Self-hosted LangGraph deployments with SQLite checkpoint storage
  • Self-hosted LangGraph deployments with Redis checkpoint storage
  • Instances exposing the get_state_history() endpoint without adequate access controls
  • Deployments where users can control filter parameters passed to checkpoint queries

  • Not Affected:

  • LangSmith Deployment (LangChain's managed platform)
  • Private or air-gapped deployments without network exposure to the vulnerable endpoint

  • ## Mitigations


    Organizations running self-hosted LangGraph instances should implement the following measures immediately:


    Immediate Actions:

  • Upgrade to langgraph version 1.0.10 or later
  • Upgrade to langgraph-checkpoint-sqlite version 3.0.1 or later
  • Upgrade to @langchain/langgraph-checkpoint-redis version 1.0.1 or later

  • Access Controls:

  • Implement strong authentication on all LangGraph endpoints, particularly get_state_history()
  • Restrict access to checkpoint management endpoints to authorized internal services only
  • Apply network segmentation to limit external access to LangGraph deployments

  • Operational Security:

  • Rotate all long-lived static secrets used by AI agents immediately
  • Treat AI agents as privileged identities with their own credential management
  • Implement the principle of least privilege (PoLP) to limit each agent's access to only required resources
  • Audit which systems and APIs the agent runtime can reach, and disable unnecessary permissions

  • Monitoring:

  • Review access logs for the get_state_history() endpoint for suspicious filter parameters
  • Monitor checkpoint storage for unexpected writes or modifications
  • Implement alerting on failed deserialization events or unusual checkpoint loading patterns

  • ## References


  • LangChain Security Advisory: https://www.langchain.com/security
  • CVE-2025-67644 (SQL Injection): https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2025-67644
  • CVE-2026-28277 (Unsafe Deserialization): https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-28277
  • CVE-2026-27022 (Query Injection): https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2026-27022
  • Check Point Research: https://www.checkpoint.com/

  • ## HackWire Analysis


    This vulnerability chain illustrates a critical inflection point in AI security: the convergence of legacy software vulnerabilities with the elevated privileges afforded to modern AI agents. SQL injection has been understood since the 1990s, and unsafe deserialization since the mid-2000s—yet their combination in an AI orchestration framework creates a uniquely dangerous exploit path.


    The key insight is that LangGraph applications often operate as highly privileged identity holders, with broad access to databases, APIs, internal systems, and sometimes sensitive business logic. When a security flaw allows an attacker to break out of the application sandbox and execute code at runtime, the blast radius extends far beyond the agent itself. An attacker gains not just access to the checkpoint store, but potentially to secrets embedded in the runtime, connected data sources, and downstream systems the agent can reach.


    What's particularly concerning is the self-hosted adoption pattern. Teams deploying LangGraph on-premises often do so because they handle sensitive data or operate in regulated environments where cloud solutions are not viable. However, self-hosted deployments typically receive less security hardening than managed platforms—there's no built-in isolation, fewer enforcement guardrails, and a greater dependency on the deploying organization's operational security maturity. This creates a paradox: the teams most motivated to avoid cloud platforms may be least equipped to defend self-hosted AI infrastructure.


    The discovery also reveals a blind spot in how the AI community thinks about security. AI frameworks are rapidly maturing, but security practices often lag behind. Teams racing to integrate agents into production systems may not be applying the same hardening disciplines—input validation, parameterized queries, safe deserialization patterns—that would be automatic in traditional backend development. This vulnerability should serve as a wake-up call: AI frameworks are not magic; they're software, and they require rigorous security controls.


    Organizations deploying LangGraph self-hosted should view this not just as a patch to apply, but as a forcing function to audit their entire AI agent security posture. Secrets management, network segmentation, access controls, and monitoring around AI infrastructure deserve the same investment and discipline as any other critical system. — HackWire Editorial


    ## Related Coverage


  • Read more in our [Vulnerabilities](https://www.hackwire.news/category/vulnerabilities) coverage
  • Cross-reference with [Breaches](https://www.hackwire.news/category/breaches) and [Malware](https://www.hackwire.news/category/malware)
  • Stay current via the [HackWire homepage](https://www.hackwire.news/)