Key takeaways
- NEAR AI says an SGLang code execution bug gave an attacker one inference server, then more of its systems.
- Confidential computing keeps the host operator out. A bug in the engine inside the enclave still exposes requests.
- SGLang and vLLM internal ports carry unauthenticated pickle or torch.distributed traffic. Keep them on an isolated network.
- vLLM’s --api-key guards only some path prefixes, so put an allowlisting gateway in front of the engine.
- Model files and request fields can reach code paths: chat templates, remote code and custom logit processors.
On 9 November 2026 NEAR AI published an incident report: an attacker had used a remote code execution bug in SGLang, the open-source inference engine on its servers, to run code on one inference server and then reach other parts of its infrastructure.1 The attacker downloaded account details for about 100 users and read the history, settings and logs of 18 legacy agents. Two cloud customers had API keys exposed in logs. NEAR AI has not said which SGLang bug it was.
For anyone serving open-weight models on their own GPUs, the lesson is about where the engine sits. SGLang and vLLM are fast, widely used and changing every week, and both projects expect their internal ports and several of their HTTP endpoints to live behind something else. SGLang has had seven CVEs coordinated through CERT/CC this year. vLLM published 66 GitHub security advisories between 1 August and 17 November 2026.2
This post covers what NEAR AI disclosed, the SGLang and vLLM issues that share its shape, the three ways untrusted input reaches an engine, and a deployment layout that limits what one engine bug can do. Facts about versions and fixes are as of 17 November 2026.
What NEAR AI says happened
NEAR AI’s report is short and specific.1 The attacker exploited the SGLang bug on one inference server and, from there, reached an internal system behind Private Chat, a product NEAR AI had already deprecated. From that system they downloaded email addresses, names and, for some accounts, plan and balance details for roughly 100 users. They also reached 18 agents on a legacy deployment of NEAR AI Agents that did not run inside NEAR AI’s confidential computing environment. On 8 November they could have observed requests being processed on the server they controlled, including requests sent in confidential mode. NEAR AI says it found no sign that stored Private Chat conversations or uploaded files were accessed.
The response list is a reasonable template for anyone who runs inference for others.
- Revoke all active sessions and administrative credentials.
- Replace every agent token.
- Take the affected product offline.
- Deploy a fix for the engine bug across all inference servers.
- Rotate the remaining credentials and complete a forensic review.
- Notify affected users and report the bug upstream.
Two details matter more than the headline. The way in was the inference engine, the one component that has to accept requests from customers. And customer API keys were in logs on systems the attacker could reach, which turned one compromised server into a credential leak.
Confidential computing did not cover the engine
NEAR AI sells private inference that runs inside hardware-isolated enclaves. Its report says this protection guards data against the operator and the host, and “does not protect against a vulnerability in the software running inside the environment”.1 The SGLang process is inside the enclave. Code execution in that process sees what the process sees, which includes prompts and outputs in flight.
The same holds for any isolation boundary drawn around an engine. A trusted execution environment, a separate VPC or a dedicated GPU node limits who can reach the engine and what the host can read. None of them makes the engine’s own request handling safe. NEAR AI says it now gives the inference software and the services around the enclave the same security review as the enclave itself.
SGLang’s code execution bugs this year
CERT/CC has published three vulnerability notes on SGLang in 2026. Two of the notes say CERT/CC got no response from the maintainers during coordination, and all three say deployments exposed to untrusted networks are at the highest risk.345
| CVE | Where | What an attacker needs | Status we found, 17 November 2026 |
|---|---|---|---|
| CVE-2026-3059 | Multimodal generation ZMQ broker calls pickle.loads() on incoming messages |
Multimodal generation enabled; network reach to the broker port | Fixed in 0.5.10, per CERT/CC. The broker binds to 127.0.0.1 on main |
| CVE-2026-3060 | Encoder parallel disaggregation calls pickle.loads() |
That feature enabled; network reach | Fixed in 0.5.10, per CERT/CC |
| CVE-2026-3989 | replay_request_dump.py loads crash dumps with pickle |
A malicious dump file in the replay path | Fixed in 0.5.10, per CERT/CC |
| CVE-2026-5760 | /v1/rerank renders a model’s chat template with an unsandboxed Jinja2 environment |
The operator loads a crafted GGUF model | Fixed on main on 29 April 2026 with a sandboxed environment6 |
| CVE-2026-7301 | Multimodal generation scheduler’s ROUTER socket calls pickle.loads(), bound to 0.0.0.0 by default |
Multimodal generation; network reach | Wildcard hosts now pinned to loopback; the socket still uses pickle7 |
| CVE-2026-7302 | Path traversal in multimodal generation uploads | Multimodal generation; network reach | We did not confirm a fix |
| CVE-2026-7304 | dill.loads() on a request-supplied custom logit processor |
Server started with --enable-custom-logit-processor |
Main still decodes the request’s callable with dill.loads()8 |
Pickle and dill are the common thread. Both formats can carry instructions that run during decoding, so any socket that unpickles bytes from a peer is a code execution endpoint for whoever can reach it. SGLang’s current fix pattern has two parts: bind internal sockets to loopback, and replace raw unpickling with an allowlisting unpickler. The comment above the scheduler endpoint on main calls that ingress “an unauthenticated pickle-RPC endpoint” and explains why wildcard hosts are pinned to 127.0.0.1.7
The same code honours an explicit IP address or hostname, because cross-machine deployments need it. If you start the multimodal server with --host set to a private IP so a load balancer can reach it, the scheduler’s pickle ingress follows to that address. The flag that makes your API reachable also decides where the internal port listens.
An open pull request from 9 November says the diffusion server’s head still decoded inbound ZMQ requests with unrestricted pickle, and proposes an allowlisted unpickler.9 Its own description notes that restricted decoding is not authentication and that internal ports still need a trusted network. That is the right reading of all of these fixes: they shrink the damage, and the network boundary still does the main work.
As of 17 November the latest SGLang release was v0.5.23 from 2 November.10 We found no release note or advisory naming the bug NEAR AI hit.
What vLLM’s own security guide says
vLLM documents its trust boundaries more fully than most projects, and the guide is worth reading line by line before a deployment.11 The points that catch teams out:
Inter-node traffic is insecure by default. PyTorch distributed communication, KV cache transfer and tensor, pipeline and data parallel traffic all have to run on an isolated network. The guide passes on PyTorch’s own warning that these channels have no authorisation and no encryption and accept connections from anywhere.
A single host is not automatically safe. When vLLM uses TCP initialisation, PyTorch creates a TCPStore that listens on every network interface. The guide recommends a firewall that blocks all inbound connections except the API port.
--api-key covers only some paths. The key is enforced under /v1, /v2, /inference and /cohere. The guide lists endpoints on the same HTTP server that answer without it, including /invocations, /pooling, /classify, /score and /rerank, which run inference, and /pause, /abort_requests and /update_weights, which change server state. It says not to rely on --api-key alone.
Development mode is remote code execution by design. With VLLM_SERVER_DEV_MODE=1, /collective_rpc runs arbitrary RPC methods on the engine. The guide says never to set it in production.
Media URLs are an SSRF path. Without --allowed-media-domains, a client can point an image or audio URL at internal services or the cloud instance metadata address. The guide also suggests VLLM_MEDIA_URL_ALLOW_REDIRECTS=0 so redirects can’t bypass the list.
The advisory feed shows where the bugs land. Of the 66 advisories published from 1 August to 17 November 2026, 14 were rated high, 48 medium and 4 low.2 Of the 30 we read, 22 describe a crash, hang or resource exhaustion that client requests can trigger, often without authentication. Three describe code execution:
- A request could set
mm_processor_kwargs.code_revisionand choose which revision of a model’s processor code Transformers imported, when the operator had enabled--trust-remote-code. Fixed in 0.31.0.12 - Image bytes went to Pillow’s format detection regardless of the declared MIME type, so an EPS file labelled as PNG could reach Ghostscript on the host. Fixed in 0.32.0.13
- The LlavaOnevision2 processor loader imported a model’s processor code even with
trust_remote_code=False, because the flag was passed to a function that ignored it. Fixed in 0.28.0.14
One older advisory is a useful warning about multi-node setups. CVE-2025-30165 is a pickle deserialisation bug in the V0 engine’s multi-node ZeroMQ broadcast, and the maintainers chose not to fix it because V0 has been off by default since 0.8.0. Their advice is a secure network.15
Three ways untrusted input reaches an engine
Sorting these bugs by entry point gives a better plan than tracking CVEs one at a time.
| Entry point | Examples above | Main control |
|---|---|---|
| The network: internal sockets reachable by a peer | SGLang ZMQ pickle sockets, PyTorch TCPStore, vLLM V0 multi-node broadcast | Bind to loopback or a private interface; firewall everything but the API port; isolated network for multi-node |
| The request: API fields that reach code or the host | Custom logit processors, code_revision, media decoders, media URLs |
A gateway that authenticates, allowlists paths and strips fields you don’t use; keep risky flags off |
| The model file: weights, templates and processor code | GGUF chat template injection, remote processor code, pickle checkpoints | Load only reviewed sources, pin revisions, prefer safetensors, leave --trust-remote-code off |
The model-file row is easy to forget because loading a model feels like configuration. A GGUF file carries a chat template that the engine renders on every request. A Hugging Face repository can carry Python that the processor loader imports. SGLang merged a change on 27 October to stop falling back to unsafe pickle when loading PyTorch checkpoints.16 Treat a new checkpoint from an unfamiliar publisher the way you would treat a new dependency.
A layout that contains a compromised engine
Assume one engine process will be compromised one day, and decide in advance what it can reach. This is the layout we recommend for open-weight deployments, and each part answers a step in NEAR AI’s report.
Gateway in front, engine behind. Clients talk to a gateway that handles authentication, per-key rate limits and request size limits. The engine binds to 127.0.0.1 or a private interface that only the gateway can reach. The gateway forwards an explicit list of paths and returns 404 for everything else:
location = /v1/chat/completions { proxy_pass http://engine:8000; }
location = /v1/embeddings { proxy_pass http://engine:8000; }
location / { return 404; }
With that in place, /invocations, /update_weights and /metrics are unreachable from outside however the engine treats its API key.
An isolated network for the GPU nodes. Tensor and pipeline parallel traffic, KV transfer and ZMQ sockets stay on a segment with no route from the application tier. Security groups allow the API port from the gateway and nothing else.
No credentials worth stealing on the engine host. The engine needs model weights and nothing more. Don’t give its instance role write access to buckets, don’t mount the application’s secrets, and block the cloud metadata address from the engine’s network namespace. Keep customer API keys out of engine logs; NEAR AI’s two exposed keys came from logs.
Default-deny egress. An engine serving a fixed model rarely needs to call out. Allow the media domains you accept, if any, and block the rest. That cuts off SSRF and makes exfiltration noisier.
One tenant’s data per engine where it matters. NEAR AI’s attacker could see requests in flight on the server they held. If some customers’ prompts are more sensitive than others, give them separate engine processes so one compromise does not expose all tenants at once.
Our post on what AI agent containment incidents taught us makes the same argument for agents: put the boundary outside the component you can’t fully trust. For the hardware and parallelism choices behind a multi-node layout, see Kimi K3.1 Pro’s open weights, which covers SGLang and vLLM recipes for one large model.
How to check an existing deployment in ten minutes
Run these from the engine host and from a machine that should have no access:
# On the engine host: which engine processes listen, and on which address?
sudo ss -ltnp | grep -Ei 'python|vllm|sglang'
# From outside the trusted network: every line should fail or time out
for p in /v1/models /metrics /version /load /health; do
printf '%-12s %s\n' "$p" "$(curl -s -m 5 -o /dev/null -w '%{http_code}' "http://ENGINE_HOST:8000$p")"
done
Anything bound to 0.0.0.0 that is not your API port is a finding. Any 200 from outside the trusted network means the engine is exposed, even if inference paths ask for a key. Then check the start-up command for --trust-remote-code, --enable-custom-logit-processor, VLLM_SERVER_DEV_MODE and --host set to a public or shared address.
A checklist before an inference server takes traffic
- The engine binds to loopback or a private interface. Only the gateway can reach its API port.
- The gateway authenticates every request and forwards only the paths your product uses.
- Multi-node traffic, ZMQ sockets and PyTorch’s TCPStore run on an isolated network with no route from clients.
--trust-remote-code,--enable-custom-logit-processorand development mode are off unless a reviewed need exists.- Media URLs are restricted to an allowlist with redirects off, or disabled.
- Model weights come from reviewed sources at pinned revisions, in safetensors where available.
- The engine host holds no cloud credentials, application secrets or customer API keys, and its logs carry none.
- Egress from the engine is denied by default.
- Someone watches the SGLang and vLLM release notes, CERT/CC notes and GitHub advisories, and upgrades within days for code execution fixes.
- You have a runbook like NEAR AI’s: revoke sessions, rotate keys and tokens, patch every server, notify users.
What we still don’t know
NEAR AI has not named the SGLang bug, the affected versions or how long the attacker had access before detection. We can’t tell from public sources whether it matches one of the CERT/CC notes above or is new, so treat every SGLang deployment as exposed until the engine is behind a gateway and its internal ports are closed. We’ll update this post when NEAR AI or the SGLang project publishes more.
-
NEAR AI, “Security Incident Report: SGLang Vulnerability”, 9 November 2026, https://near.ai/blog/security-incident-report-sglang-vulnerability ↩↩↩
-
vLLM security advisories on GitHub, counted 17 November 2026, https://github.com/vllm-project/vllm/security/advisories ↩↩
-
CERT/CC, “VU#665416: SGLang (sglang) is vulnerable to code execution attacks via unsafe pickle deserialization”, 12 March 2026, revised 7 April 2026, https://kb.cert.org/vuls/id/665416 ↩
-
CERT/CC, “VU#915947: SGLang is vulnerable to remote code execution when rendering chat templates from a model file”, 20 April 2026, revised 27 April 2026, https://kb.cert.org/vuls/id/915947 ↩
-
CERT/CC, “VU#777338: SGLang contains two remote code execution and one path traversal vulnerability”, 18 May 2026, https://kb.cert.org/vuls/id/777338 ↩
-
SGLang pull request #23660, “Fix for CVE-2026-5760”, merged 29 April 2026, https://github.com/sgl-project/sglang/pull/23660 ↩
-
SGLang source,
multimodal_gen/runtime/server_args/server_args.pyon main, read 17 November 2026, https://github.com/sgl-project/sglang/blob/main/python/sglang/multimodal_gen/runtime/server_args/server_args.py ↩↩ -
SGLang source,
srt/sampling/custom_logit_processor.pyon main, read 17 November 2026, https://github.com/sgl-project/sglang/blob/main/python/sglang/srt/sampling/custom_logit_processor.py ↩ -
SGLang pull request #49290, “[Fix] diffusion: Use safe_pickle_loads for DiffusionServer inbound requests”, opened 9 November 2026, open on 17 November 2026, https://github.com/sgl-project/sglang/pull/49290 ↩
-
SGLang releases on GitHub, read 17 November 2026, https://github.com/sgl-project/sglang/releases ↩
-
vLLM documentation, “Security”, read 17 November 2026, https://docs.vllm.ai/en/latest/usage/security.html ↩
-
vLLM advisory GHSA-h3rc-6mm3-gc2m, “Request-controlled mm_processor_kwargs.code_revision allows remote code execution”, https://github.com/vllm-project/vllm/security/advisories/GHSA-h3rc-6mm3-gc2m ↩
-
vLLM advisory GHSA-h3rc-j82p-2c3h, “Untrusted EPS inputs can trigger denial of service or Ghostscript RCE in vLLM”, https://github.com/vllm-project/vllm/security/advisories/GHSA-h3rc-j82p-2c3h ↩
-
vLLM advisory GHSA-3c86-2m5g-59q7, LlavaOnevision2 processor loader executes model code with trust_remote_code=False, https://github.com/vllm-project/vllm/security/advisories/GHSA-3c86-2m5g-59q7 ↩
-
vLLM advisory GHSA-9pcc-gvx5-r5wm (CVE-2025-30165), “Remote Code Execution Vulnerability in vLLM Multi-Node Cluster Configuration”, 6 May 2025, https://github.com/vllm-project/vllm/security/advisories/GHSA-9pcc-gvx5-r5wm ↩
-
SGLang pull request #42760, “[Fix] model_loader: Avoid unsafe pickle fallback when loading PyTorch checkpoints”, merged 27 October 2026, https://github.com/sgl-project/sglang/pull/42760 ↩
Frequently asked questions
Which SGLang vulnerability was used in the NEAR AI breach?
NEAR AI has not named it. Its incident report of 9 November 2026 says an attacker used a remote code execution vulnerability in SGLang on one inference server, that NEAR AI deployed a fix on all its servers, and that it reported the bug to the SGLang project. As of 17 November 2026 we found no SGLang release or advisory naming it.
Is it safe to expose an SGLang or vLLM server to the internet?
Not directly. Both projects expect internal ports to sit on a trusted network, and CERT/CC’s SGLang notes all say deployments exposed to untrusted networks face the highest risk. Put a gateway in front that handles authentication and forwards only the API paths you use, and bind the engine to loopback or a private interface.
Does vLLM’s --api-key protect every endpoint?
No. vLLM’s security guide says the key is enforced only under the /v1, /v2, /inference and /cohere prefixes. Endpoints such as /invocations, /pooling, /score, /rerank, /pause, /update_weights and /metrics answer without it, so the guide says not to rely on --api-key alone.
Does a trusted execution environment protect against inference engine vulnerabilities?
No. NEAR AI’s report says confidential computing protects data from the operator and the host, but the SGLang bug let the attacker run code inside the inference server and see requests in processing there, including confidential-mode ones.
Can a malicious model file run code on an inference server?
Yes. CVE-2026-5760 used a GGUF file whose chat template carried a Jinja2 payload that SGLang’s rerank endpoint rendered without a sandbox, and a vLLM advisory showed a model’s processor code running even with trust_remote_code set to false. Load weights only from sources you have reviewed and pin revisions.
How do I check whether my inference server’s ports are exposed?
List listening sockets on the host with ss -ltnp and note any engine process bound to 0.0.0.0 or a public address. Then, from a machine that should have no access, request harmless GET paths such as /v1/models, /metrics and /version and confirm each one is refused or times out.
Building something like this?
9io is a small team of senior engineers with a fractional CTO. We work by the hour, and plans start at $5,000. Send us a note about your product. The reply comes from the person who'd do the work.