Skip to main content
Vulnerability Database/CVE-2026-75128

CVE-2026-75128: Langchain-Chatchat Auth Bypass Vulnerability

CVE-2026-75128 is an authentication bypass flaw in Langchain-Chatchat that allows remote attackers to execute arbitrary OS commands without authentication. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-75128 Overview

CVE-2026-75128 is an unauthenticated remote code execution vulnerability in Langchain-Chatchat through version 0.3.1.3. The application exposes a POST /tools/call API endpoint that invokes any registered tool by name without authentication. Because the shell tool is always registered, remote attackers can send a single HTTP request to execute arbitrary operating system commands. In the shipped Docker image, these commands run as root, giving attackers full control of the container. The flaw is classified under CWE-306: Missing Authentication for Critical Function.

Critical Impact

Any network-reachable Langchain-Chatchat instance can be fully compromised with one unauthenticated HTTP request that invokes the shell tool.

Affected Products

  • Langchain-Chatchat versions up to and including 0.3.1.3
  • Default Docker image deployments of Langchain-Chatchat (shell commands execute as root)
  • Any self-hosted installation exposing the chatchat-server API over the network

Discovery Timeline

  • 2026-10-20 - CVE-2026-75128 published to NVD
  • 2026-10-20 - Last updated in NVD database

Technical Details for CVE-2026-75128

Vulnerability Analysis

Langchain-Chatchat is an open-source retrieval-augmented generation (RAG) and agent framework. The server exposes a tool-invocation API designed to let language model agents call registered tools by name. The route handler in libs/chatchat-server/chatchat/server/api_server/tool_routes.py accepts a POST /tools/call request and dispatches to the named tool with caller-controlled arguments.

The handler performs no authentication, no session validation, and no allow-listing of callable tools. The shell tool is registered by default and remains callable in production deployments. Any remote client that can reach the HTTP endpoint can therefore request execution of arbitrary shell commands. Because Langchain-Chatchat is commonly deployed on internet-facing hosts to serve chat interfaces, the exposure surface is broad.

Root Cause

The root cause is missing authentication on a sensitive dispatch endpoint combined with an overly permissive tool registry. The /tools/call route exposes any registered tool, including a general-purpose shell execution tool, with no caller identity check. See the vulnerable route handler for the implementation detail.

Attack Vector

Exploitation requires only network access to the Chatchat API. An attacker sends a single POST request to /tools/call with a JSON body naming the shell tool and supplying the command to run. The server executes the command as the service account. In Docker-based deployments, this account is root inside the container, enabling file read and write, credential theft, lateral movement, and persistence. See the VulnCheck advisory and the Lasso Security writeup for additional analysis.

// Example exploitation code (sanitized)
No verified public proof-of-concept code is available. The attack consists of an unauthenticated HTTP POST to /tools/call that names the shell tool and passes an attacker-controlled command string. Refer to the vendor source link above for the vulnerable handler.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-75128

Indicators of Compromise

  • HTTP POST requests to the /tools/call endpoint from unexpected source addresses, especially those containing a tool name field referencing shell.
  • Child processes spawned by the Chatchat Python server (for example sh, bash, curl, wget, python -c) that are inconsistent with normal application behavior.
  • Outbound network connections initiated by the Chatchat container to attacker-controlled hosts shortly after /tools/call requests.
  • New files, cron entries, or SSH keys written under the Chatchat service account or inside the container filesystem.

Detection Strategies

  • Alert on any HTTP request to /tools/call originating from outside expected agent clients, and on request bodies naming privileged tools such as shell.
  • Correlate web access logs with endpoint process telemetry to flag shell processes whose parent is the chatchat-server or uvicorn process.
  • Hunt for reverse shell patterns, encoded payloads, or base64 -d | sh sequences in command-line telemetry on hosts running Langchain-Chatchat.

Monitoring Recommendations

  • Forward Chatchat application logs and reverse proxy access logs to a centralized SIEM for retention and detection content.
  • Enable Linux process and network auditing (auditd, eBPF, or equivalent) on hosts running the service to capture command execution lineage.
  • Monitor egress from Chatchat workloads and alert on connections to non-approved destinations, including unknown IPs on ports commonly used for shells.

How to Mitigate CVE-2026-75128

Immediate Actions Required

  • Remove direct internet exposure of Langchain-Chatchat and place the service behind an authenticating reverse proxy or VPN.
  • Disable or unregister the shell tool and any other command-executing tools in the Chatchat configuration until a fixed release is deployed.
  • Audit historical access logs for requests to /tools/call and investigate hosts for signs of post-exploitation activity.
  • Rotate credentials, API keys, and tokens stored on or accessible to the Chatchat host, as they must be considered exposed.

Patch Information

At the time of NVD publication on 2026-10-20, Langchain-Chatchat versions through 0.3.1.3 are affected and no fixed version is listed in the referenced advisories. Monitor the Langchain-Chatchat GitHub repository and the VulnCheck advisory for an upstream patch, and upgrade as soon as a corrected release is published.

Workarounds

  • Terminate TLS at a reverse proxy such as Nginx or Caddy and require authentication (mTLS, OIDC, or basic auth) before any request reaches /tools/call.
  • Apply network policies or host firewall rules to restrict access to the Chatchat API to a known allow-list of agent clients.
  • Run the Chatchat container as a non-root user and drop Linux capabilities to limit blast radius if the shell tool is invoked.
  • Remove the shell tool registration from the server configuration and restart the service to shrink the attack surface.
bash
# Configuration example
# Example Nginx snippet enforcing authentication in front of Langchain-Chatchat
location /tools/call {
    auth_basic           "Chatchat restricted";
    auth_basic_user_file /etc/nginx/.htpasswd;
    allow 10.0.0.0/8;
    deny  all;
    proxy_pass http://127.0.0.1:7861;
}

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.