CVE-2026-86793
CVE-2026-86793
Refuses execve from SGLang processes to mitigate CVE-2026-86793.
Critical 9.8Vetted
EPSS 0.9%: the estimated chance this CVE is exploited in the next 30 days, as of 24 Nov 2026.
At a glance
CVE-2026-86793 is a critical (CVSS 9.8) vulnerability in SGLang, published 11 September 2026. A vetted upatch, cve-2026-86793-sglang-block, blocks it on running Linux machines with shirudo until SGLang is upgraded.
- Severity
- Critical 9.8 CVSS 3.1
- Chance of exploitation
- 0.9% in the next 30 days (EPSS, 24 Nov 2026)
- Known exploited
- No, not on CISA’s KEV list
- Weakness
- CWE-94
- Affected software
- SGLang
- Upatch status
- Vetted, merged into the registry
- How to apply
- Build, sign and roll out with shirudo
Overview
CVE-2026-86793, published on 11 September 2026, is an unauthenticated remote code execution vulnerability in SGLang (versions up to and including 0.5.21 in the CVE record, fixed after 0.5.14 in the main branch via pull requests #39858 and #40259). When SGLang is started without authentication keys configured, the /update_weights_from_tensor endpoint (AuthLevel.ADMIN_OPTIONAL in python/sglang/srt/entrypoints/http_server.py) accepts base64-encoded pickle payloads in serialized_named_tensors and passes them to MultiprocessingSerializer.deserialize (SafeUnpickler.load() in python/sglang/srt/utils/common.py). Because SafeUnpickler.ALLOWED_MODULE_PREFIXES allows "builtins." and DENY_CLASSES omits builtins.__import__ and builtins.getattr, a pickle payload can resolve builtins.__import__ and builtins.getattr through SafeUnpickler.find_class() and chain them via REDUCE to import os and call os.system or spawn a subprocess.
Official description
SGLang allows unauthenticated pickle deserialization through /update_weights_from_tensor when no auth keys are configured, and the SafeUnpickler policy can be bypassed because builtins.import and builtins.getattr are resolvable, enabling code execution via pickle REDUCE.
Affected versions
SGLang:
| Version | Status |
|---|---|
| <= 0.5.14 (<= 0.5.21 per CVE record) | Affected |
| main after PR #39858 and PR #40259 | Fixed |
Kernels: any Linux kernel supported by shirudo with BPF LSM and BTF enabled.
Sources
More references from NVD (4)
Mitigation
The BPF LSM program attaches to lsm/bprm_check_security and returns -EPERM when the calling task or its real_parent has a task comm starting with sglang (such as sglang or sglang::scheduler). When an attacker bypasses SafeUnpickler to run a shell command via os.system (which forks a child and executes /bin/sh) or subprocess.Popen, the kernel refuses the execve call with EPERM.
The refused per-CPU array map counts refused execution attempts at key 0.
Side effects
- SGLang processes whose
commstarts withsglang(and their direct forked children) cannot execute new external binaries viaexecveafter startup. - Normal tensor deserialization and HTTP inference handling inside Python continue to work, while any attempt by a worker or server process to spawn a shell or external command fails with
EPERM. - Not covered: Pure in-memory Python actions that do not call
execve, or an SGLang process started under a process name that does not begin withsglang.
Preemption model and cost
The program keeps no shared state beyond the per-CPU refused counter, which it increments with __sync_fetch_and_add, making it safe under all preemption models including preemptible RCU and PREEMPT_LAZY. On every execve, the program reads the current task's 16-byte comm and, if needed, its parent's comm, returning immediately when neither starts with sglang.
The policy
64 lines of BPF C, attached at lsm/bprm_check_security.
// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>
#define EPERM 1
char _license[] SEC("license") = "Dual BSD/GPL";
struct {
__uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
__uint(max_entries, 1);
__type(key, __u32);
__type(value, __u64);
} refused SEC(".maps");
static __always_inline void count(void)
{
__u32 key = 0;
__u64 *value = bpf_map_lookup_elem(&refused, &key);
if (value)
__sync_fetch_and_add(value, 1);
}
static __always_inline int earlier_verdict(int ret)
{
return ret >= -4095 && ret < 0 ? ret : -EPERM;
}
static __always_inline bool is_sglang_comm(const char comm[16])
{
return comm[0] == 's' && comm[1] == 'g' && comm[2] == 'l' &&
comm[3] == 'a' && comm[4] == 'n' && comm[5] == 'g';
}
static __always_inline bool is_sglang_task(const struct task_struct *task)
{
char comm[16] = {};
if (!task)
return false;
if (bpf_probe_read_kernel(&comm, sizeof(comm), &task->comm))
return false;
return is_sglang_comm(comm);
}
SEC("lsm/bprm_check_security")
int BPF_PROG(cve_2026_86793_exec, struct linux_binprm *bprm, int ret)
{
struct task_struct *task;
if (ret)
return earlier_verdict(ret);
task = bpf_get_current_task_btf();
if (!is_sglang_task(task) &&
!is_sglang_task(BPF_CORE_READ(task, real_parent)))
return 0;
count();
return -EPERM;
}
The package: name, license, the program and the CVE it fixes.
[package]
name = "cve-2026-86793"
description = "Refuses execve from SGLang processes to mitigate CVE-2026-86793"
license = "GPL-2.0 OR BSD-2-Clause"
[[upatches]]
source = "cve-2026-86793-sglang-block.bpf.c"
[upatches.tree]
id = "cve-2026-86793-sglang-block"
fixes = ["CVE-2026-86793"]
Process
How this upatch was written, checked and reviewed, from the registry’s history.
- 11 Sept 2026CVECVE published
- 25 Nov 2026Pull requestPull request #35 openedAdd CVE-2026-86793: Refuses execve from SGLang processesromanlab
- 25 Nov 2026MergeMerged #35romanlab
- 25 Nov 2026ReviewReviewedqodo-code-review[bot] (automated)
No human review is recorded on GitHub for this upatch yet.
Evidence
On SGLang v0.5.14, the loaded upatch refused subprocess execution triggered through SafeUnpickler deserialization on /update_weights_from_tensor before and after comparison.
- Tested
- 25 Nov 2026
- Target
- SGLang v0.5.14 (/update_weights_from_tensor with SafeUnpickler), loopback only
- Kernel
- 7.4-shirudo-ci-20261123
- Architecture
- x86_64
- Distribution
- Ubuntu 26.04
| State | Subprocess execve via SafeUnpickler blocked |
|---|---|
| Before loading | no (reached) |
| Upatch loaded | yes (EPERM) |
| After unloading | no (reached) |
tools-test.log Output of tools/test --setup showing the payload reached before, blocked while the upatch was loaded, and reached again after unload.
tools/test --setup, 2026-11-25T11:43:28Z Target: shirudo test VM, Linux 7.4-shirudo-ci-20261123, x86_64, swtpm cve-2026-86793 setup done SGLANG_URL=http://127.0.0.1:30000 before reached SafeUnpickler deserialized the gadget chain and executed /bin/true loaded blocked SafeUnpickler ran the gadget chain but execve was refused with EPERM after reached SafeUnpickler deserialized the gadget chain and executed /bin/true PASS: reached before, blocked while loaded, reached again after
Use it
Build the upatch from source, sign it with your own shirudo key, and publish it to your own OCI registry. Machines that follow your upatch tree load it within about a minute.
git clone https://github.com/copper-helm/upatch-registry
cd upatch-registry
tools/build <shirudo-checkout> <keys-dir> 1.0.0 upatches/cve-2026-86793shirudo bpm push build/packages/cve-2026-86793-1.0.0.bee oci://<registry>/<namespace>/cve-2026-86793 --keys-dir <keys-dir>
shirudo bpm tree append build/packages/cve-2026-86793-1.0.0.bee oci://<registry>/<namespace>/<tree> --tree-id <tree-id> --keys-dir <keys-dir>