Back to Intelligence

CVE-2026-75128: Unauthenticated RCE in Langchain-Chatchat — Detection and Remediation Guide

SA
Security Arsenal Team
October 20, 2026
9 min read

NVD has published CVE-2026-75128, a CVSS 9.8 (Critical) network-exploitable vulnerability in Langchain-Chatchat through version 0.3.1.3 — a widely deployed open-source knowledge-base and RAG framework built on LangChain, frequently shipped inside Docker containers. The flaw is brutally simple: the application exposes an unauthenticated POST /tools/call API endpoint that invokes any registered tool by name. Because a shell tool is always registered, any remote attacker who can reach the web interface can send a single HTTP request naming that tool and execute arbitrary operating system commands as the server user — which, in the shipped Docker image, is root.

This is the kind of vulnerability that moves from NVD publication to mass scanning within hours. Langchain-Chatchat instances are routinely exposed to the internet by AI/ML teams standing up internal chatbot proofs-of-concept, and the default container runs with root privileges and often has broad access to internal networks, vector databases, and document stores. If you run any LangChain-based knowledge-base application, assume it is being probed right now and treat this as an emergency patch-and-hunt event.

Technical Analysis

Affected Products and Versions

ComponentAffected VersionsNotes
Langchain-ChatchatAll versions through 0.3.1.3Python web application (FastAPI-based), commonly deployed via the official Docker image
Shipped Docker imageAll builds through 0.3.1.3Server process runs as root, dramatically increasing blast radius

How the Vulnerability Works

The attack chain requires no authentication, no user interaction, and no special conditions:

  1. Reconnaissance: The attacker identifies an exposed Langchain-Chatchat instance (default port 7861 for the API server is commonly seen, though deployments vary; the web UI and API are frequently exposed together).
  2. Exploitation: The attacker sends a single POST request to /tools/call with a JSON body naming the shell tool and supplying an arbitrary command string as the tool input.
  3. Execution: The server passes the command to the host shell. Because the endpoint performs no authentication or authorization checks, and the shell tool is registered unconditionally, the command executes with the privileges of the server process — root in the default container.
  4. Post-exploitation: Root inside the container means trivial access to mounted volumes, environment variables (frequently containing LLM API keys, database credentials, and cloud tokens), and a staging point for container escape or lateral movement into adjacent infrastructure.

From a defender's perspective, the key observables are: inbound POST requests to /tools/call, and — critically — the Python server process (uvicorn/python spawning /bin/sh, /bin/bash, or common post-exploitation binaries like curl, wget, id, whoami, nc). A web application for LLM orchestration has essentially zero legitimate reason to spawn OS shells at runtime, which gives us a high-fidelity detection surface.

Exploitation Status

The vulnerability is a straightforward, single-request, unauthenticated RCE — the lowest-effort class of remote exploitation. Defenders should treat CVE-2026-75128 as functionally exploitable by any internet-connected actor the moment the advisory is public, regardless of whether a formal PoC or CISA KEV listing has been published at the time you read this. Check the NVD entry and CISA KEV for the latest exploitation status, and assume opportunistic scanning is underway against any internet-facing instance.

Detection & Response

Sigma Rules

YAML
---
title: Langchain-Chatchat Web Process Spawning Shell - CVE-2026-75128
id: 3f8a1c72-5b94-4d21-9e67-8a2c4f1b9d03
status: experimental
description: Detects the Langchain-Chatchat Python/uvicorn server process spawning a shell or command interpreter, consistent with exploitation of the unauthenticated /tools/call shell tool (CVE-2026-75128).
references:
  - https://nvd.nist.gov/vuln/detail/CVE-2026-75128
  - https://attack.mitre.org/techniques/T1059/004/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.execution
  - attack.t1059.004
logsource:
  category: process_creation
  product: linux
detection:
  selection_parent:
    ParentImage|endswith:
      - '/python'
      - '/python3'
      - '/python3.10'
      - '/python3.11'
      - '/python3.12'
      - '/uvicorn'
  selection_child:
    Image|endswith:
      - '/sh'
      - '/bash'
      - '/dash'
      - '/ash'
      - '/zsh'
      - '/curl'
      - '/wget'
      - '/nc'
      - '/ncat'
      - '/id'
      - '/whoami'
  condition: selection_parent and selection_child
falsepositives:
  - Legitimate plugin or tooling integrations that shell out from the application server - investigate parent working directory and command line before tuning
level: high
---
title: HTTP POST to Langchain-Chatchat Tools Call Endpoint - CVE-2026-75128
id: 91c4e6a8-2d07-4f3b-b851-6c9d3a7e52f4
status: experimental
description: Detects inbound POST requests to the /tools/call API endpoint, the exploitation vector for unauthenticated remote command execution in Langchain-Chatchat (CVE-2026-75128).
references:
  - https://nvd.nist.gov/vuln/detail/CVE-2026-75128
  - https://attack.mitre.org/techniques/T1190/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.initial_access
  - attack.t1190
logsource:
  category: webserver
detection:
  selection:
    cs-method: 'POST'
    cs-uri-stem|contains: '/tools/call'
  condition: selection
falsepositives:
  - Legitimate internal application usage of the tools API - verify source IP is an authorized internal client and confirm the instance is patched
level: critical
---
title: Reverse Shell or Download Activity from Python Web Server
id: b47d2f19-8c35-4a6e-9d12-5e8f0b3a71c6
status: experimental
description: Detects common post-exploitation command lines (reverse shells, payload downloads) executed under a Python web server process, indicative of successful CVE-2026-75128 exploitation.
references:
  - https://nvd.nist.gov/vuln/detail/CVE-2026-75128
  - https://attack.mitre.org/techniques/T1059/
author: Security Arsenal
date: 2026/01/15
tags:
  - attack.command_and_control
  - attack.t1071.001
  - attack.t1059
logsource:
  category: process_creation
  product: linux
detection:
  selection_parent:
    ParentCommandLine|contains:
      - 'chatchat'
      - 'uvicorn'
  selection_payload:
    CommandLine|contains:
      - '/dev/tcp/'
      - 'bash -i'
      - 'nc -e'
      - 'ncat -e'
      - 'curl http'
      - 'wget http'
      - 'chmod +x /tmp'
      - 'base64 -d'
  condition: selection_parent and selection_payload
falsepositives:
  - Rare; any match warrants immediate investigation
level: critical

KQL — Microsoft Sentinel / Defender

KQL — Microsoft Sentinel / Defender
// Hunt 1: Inbound POST requests to the /tools/call endpoint (web/proxy/firewall logs ingested as CommonSecurityLog or Syslog)
CommonSecurityLog
| where TimeGenerated > ago(14d)
| where RequestMethod =~ "POST"
| where RequestURL contains "/tools/call"
| project TimeGenerated, SourceIP, SourcePort, DestinationIP, DestinationHostName, RequestURL, RequestMethod, DeviceAction
| sort by TimeGenerated desc
;
// Hunt 2: Shell or post-exploitation processes spawned by the Python/chatchat server on Linux hosts (Syslog or Defender process events)
Syslog
| where TimeGenerated > ago(14d)
| where ProcessName in~ ("sh", "bash", "dash", "curl", "wget", "nc", "ncat", "id", "whoami")
| where SyslogMessage has_any ("chatchat", "uvicorn") or SyslogMessage has_any ("/dev/tcp/", "bash -i", "nc -e")
| project TimeGenerated, Computer, ProcessName, SyslogMessage
| sort by TimeGenerated desc
;
// Hunt 3: Defender for Endpoint - shell children of python/uvicorn processes
DeviceProcessEvents
| where TimeGenerated > ago(14d)
| where InitiatingProcessFileName has_any ("python", "python3", "uvicorn")
| where FileName in~ ("sh", "bash", "dash", "curl", "wget", "nc", "ncat", "id", "whoami", "chmod")
| project TimeGenerated, DeviceName, InitiatingProcessCommandLine, FileName, ProcessCommandLine, AccountName
| sort by TimeGenerated desc

Velociraptor VQL

VQL — Velociraptor
-- Hunt for shell/process descendants of the Langchain-Chatchat Python server and its network connections
SELECT Pid, Ppid, Name, CommandLine, Exe, Username, CreateTime
FROM pslist()
WHERE (Name =~ '(?i)sh$|bash|dash|curl|wget|nc|ncat|id$|whoami'
   OR CommandLine =~ '(?i)/dev/tcp/|bash -i|nc -e|curl http|wget http')
   AND Ppid IN (
       SELECT Pid FROM pslist()
       WHERE CommandLine =~ '(?i)chatchat|uvicorn'
   )

-- Also enumerate listening sockets owned by the server to confirm exposure
SELECT Pid, Name, CommandLine, Family, Type, Status, Laddr, Lport
FROM netstat()
WHERE CommandLine =~ '(?i)chatchat|uvicorn'
   AND Status =~ 'LISTEN'

Verification and Hardening Script (Bash)

Bash / Shell
#!/usr/bin/env bash
# CVE-2026-75128 verification and hardening for Langchain-Chatchat deployments
# Run on the host (or inside the container) as root.
set -euo pipefail

# 1. Identify running Langchain-Chatchat instances and their version
ps aux | grep -Ei 'chatchat|startup.py|uvicorn' | grep -v grep || echo "No chatchat processes found on host."
docker ps --format '{{.Names}} {{.Image}}' 2>/dev/null | grep -i chatchat || echo "No chatchat containers found."
pip show langchain-chatchat 2>/dev/null | grep -E '^(Name|Version)' || true

# 2. Check whether the API port is exposed beyond localhost
ss -tlnp | grep -E ':7861|:8501' || echo "Default chatchat ports not listening."

# 3. Emergency mitigation: block inbound access to the tools API at the host firewall
# (Only apply if the instance cannot be patched immediately.)
iptables -C INPUT -p tcp --dport 7861 ! -s 127.0.0.1 -j DROP 2>/dev/null || \
iptables -I INPUT -p tcp --dport 7861 ! -s 127.0.0.1 -j DROP
echo "Firewall drop rule applied for inbound 7861 (non-localhost)."

# 4. Review recent access logs for exploitation attempts
grep -E 'POST.*/tools/call' /var/log/nginx/access.log /var/log/apache2/access.log 2>/dev/null || \
echo "No matches in common reverse-proxy logs; check application/container logs directly: docker logs <container> | grep '/tools/call'"

# 5. Upgrade to the fixed release (check the project advisory for the patched version > 0.3.1.3)
pip install --upgrade langchain-chatchat
# For container deployments, pull the patched image, recreate the container, and run as non-root:
# docker pull <patched-image>
# docker run --user 1000:1000 --read-only --cap-drop ALL ...

Remediation

  1. Upgrade immediately. Update Langchain-Chatchat to a release newer than 0.3.1.3 once the project publishes the fixed version. Monitor the NVD entry for CVE-2026-75128 and the upstream project's GitHub security advisories for the exact patched release and vendor guidance. Until a fixed build is deployed, treat every reachable instance as compromised-ready.
  2. Take internet-facing instances offline or behind a firewall now. If the API port (commonly 7861) is reachable from untrusted networks, restrict it to localhost or an allow-listed internal range using host firewall rules (see script above) or a reverse proxy ACL. There is no legitimate reason for an unauthenticated AI chatbot tool endpoint to be internet-facing.
  3. Disable or gate the shell tool. Where configuration permits, remove the shell tool from the registered tool list, and place the entire /tools/* API surface behind authentication (reverse proxy with SSO/mTLS, or an application-level API key). Unauthenticated tool invocation should never be the default posture.
  4. Stop running as root. Redeploy the container with a non-root user (--user), --read-only root filesystem, --cap-drop ALL, and no Docker socket mount. Even after patching, this converts any future RCE into a far less damaging foothold.
  5. Hunt before you patch. Because exploitation is a single request, run the log hunts above against historical data (minimum 30 days if available). Look for any POST /tools/call from unexpected source IPs and for shell children of the server process. If you find hits, pivot to full IR: capture the container filesystem, review egress connections, and rotate every credential in the container's environment — LLM API keys, database strings, and cloud tokens are the first things an attacker will read.
  6. Inventory your AI stack. LangChain-based frameworks are proliferating across enterprises with little security review. Add Langchain-Chatchat and similar LLM orchestration tools to your asset inventory and vulnerability management scope — this will not be the last critical RCE in this ecosystem.

Related Resources

Security Arsenal Penetration Testing Services AlertMonitor Platform Book a SOC Assessment vulnerability-management Intel Hub

Is your security operations ready?

Get a free SOC assessment or see how AlertMonitor cuts through alert noise with automated triage.