CVE-2026-5760 CVE-2026-5760
Attackers can achieve remote code execution in SGLang by loading a model with a malicious Jinja2 chat template due to unsandboxed rendering.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- None listed
What is CVE-2026-5760?
CVE-2026-5760 is a critical code injection vulnerability in SGLang, published on 20 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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().
Weakness: CWE-94
Which versions are affected by CVE-2026-5760?
It affects 1 product.
Products include Lmsys Sglang.
How do I fix CVE-2026-5760?
No fix has been published for CVE-2026-5760 yet. Limit exposure of the affected software until one is available.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2026-5760 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-5760 exists.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in SGLang
Sources
Also known as GHSA-2wm4-697g-pfq8.