Arbitrary Code Injection Affecting sglang package, versions [0,0.5.11)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.85% (54th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-SGLANG-16114943
  • published21 Apr 2026
  • disclosed20 Apr 2026
  • creditStuart Beck

Introduced: 20 Apr 2026

CVE-2026-5760  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade sglang to version 0.5.11 or higher.

Overview

sglang is a SGLang is a fast serving framework for large language models and vision language models.

Affected versions of this package are vulnerable to Arbitrary Code Injection via the reranking endpoint when a model file containing a malicious tokenizer.chat_template is loaded, due to rendering Jinja2 chat templates using an unsandboxed jinja2.Environment. An attacker can execute arbitrary code by supplying a crafted model file with a malicious template.

CVSS Base Scores

version 4.0
version 3.1