SGLang CVE-2026-5760 Could Enable RCE via Malicious GGUF Models

Summary
CVE-2026-5760 (CVSS 9.8) affects SGLang’s /v1/rerank endpoint: a loaded malicious GGUF model can exploit an unsandboxed Jinja2 template to execute Python code. CERT/CC recommends ImmutableSandboxedEnvironment; no patch response was obtained.
Key points
- CVE-2026-5760 is a critical command-injection flaw rated CVSS 9.8 in SGLang’s /v1/rerank endpoint.
- A malicious GGUF model can place a Jinja2 SSTI payload in tokenizer.chat_template and use a Qwen3 reranker trigger phrase to reach the vulnerable code path.
- When the model is loaded and a request reaches the endpoint, the template is rendered with unsandboxed jinja2.Environment(), potentially enabling arbitrary Python code execution on the server.
- CERT/CC and researcher Stuart Beck recommend using ImmutableSandboxedEnvironment to render chat templates.
- The article says no response or patch was obtained during coordination.
Article Details
- Vulnerability Types
- Command injection
- Jinja2 server-side template injection (SSTI)
- Severity
- Critical (CVSS 9.8)
- Exploitation Status
- unknown
- Exploit Availability
- unknown
- Patch Status
- unavailable
- Workarounds
- Use ImmutableSandboxedEnvironment instead of jinja2.Environment() to render chat templates.
MITRE ATT&CK
CVE
CVE-2024-34359abetlen · llama-cpp-pythonIt’s worth noting that CVE-2026-5760 falls under the same vulnerability class as CVE-2024-34359 (aka Llama Drama, CVSS score: 9.7), a now-patched critical flaw in the llama_cpp_python Python package that could haveCVE-2025-61620Vendor / Product unavailableThe same attack surface was also rectified in vLLM late last year (CVE-2025-61620, CVSS score: 6.5).CVE-2026-5760SGLang · SGLangA critical command-injection vulnerability (CVE-2026-5760, CVSS 9.8) in SGLang’s /v1/rerank endpoint can be exploited via a malicious GGUF model containing a Jinja2 SSTI payload to achieve remote code execution.
