How an SGLang RCE Flaw Broke NEAR AI: Why a TEE Doesn't Protect the Software Running Inside It

By Carlos Montiel | Enterprise AI Specialist
Leer en español →
Published: 2026-11-19 | By: Carlos Montiel | Reading time: ~6 minutes
How an SGLang RCE flaw broke NEAR AI: why a TEE doesn't protect the software running inside it

NEAR AI, an inference platform that sells privacy through trusted execution environments (TEEs), disclosed on November 9, 2026 that an attacker ran code on one of its servers through a remote execution flaw in SGLang, the open-source inference engine. The lesson isn't the incident itself: it's what a TEE does and doesn't protect.

What Happened

According to NEAR AI's incident report, as covered by Decrypt (November 10) and in Rajesh Beri's analysis (November 11), an attacker used a remote code execution (RCE) vulnerability in SGLang to run commands on an inference server and move from there to other parts of the infrastructure. NEAR AI reported the flaw to the SGLang developers and did not identify which CVE was exploited.

Data reported by NEAR AI (via Decrypt and Beri) - ~100 users: names and emails; plan and balance in some cases (internal Private Chat system, a service already retired) - 18 agents from an old deployment: chat histories, configuration and logs - 2 NEAR AI Cloud customer API keys, written to logs (revoked) - Nov 8, 2026: date on which the attacker could observe requests on one server, including confidential ones ("a possibility," per Decrypt) - No sign of access to stored Private Chat conversations or uploaded files

NEAR AI says that on detecting the attack it revoked all sessions and administrative credentials, replaced agent tokens, took Private Chat offline and deployed a patch across all of its inference servers. It completed the credential rotation and a forensic review, notified those affected and contacted the owners of the 18 agents one by one. It did not disclose how long the attacker was inside or what exactly the patch changed.

Why a TEE Didn't Prevent It

The NEAR AI Cloud product uses a TEE so that prompts stay encrypted and isolated even from the server operator. The company itself made the point clear: the TEE "does not protect against a vulnerability in the software running inside the environment." The reason is mechanical: an inference engine has to decrypt the prompt to run the model, so anyone who manages to execute code inside the engine sees the plain text. Beri sums it up this way: the enclave held, but the engine inside it did not.

A subtler point, cited from a Cloud Security Alliance research note: remote attestation will still validate a measured image even if it contains a vulnerable version. For attestation to mean anything, the provider would have to reject measurements tied to versions with known flaws and publish a manifest of component versions. Transparency note: the sources differ on whether the 18 agents were inside the confidential environment; Decrypt says they were not.

SGLang: A Long History of Deserialization Flaws

Beri lists at least 14 SGLang vulnerabilities across five CERT/CC advisories in 2026. None of the sources confirm which one the attacker used, so this is context, not attribution:

VU#665416 (Mar 12) CVE-2026-3059, -3060, -3989 pickle.loads() on untrusted data VU#915947 (Apr 20) CVE-2026-5760 malicious GGUF chat template executes code (/v1/rerank) VU#777338 (May 18) CVE-2026-7301, -7302, -7304 pickle on scheduler socket (0.0.0.0 by default), path traversal, dill.loads() VU#326070 (Jul 16) CVE-2026-14890 expert-parallel ZeroMQ socket deserializes without authentication VU#281278 (Jul 30) CVE-2026-15969 to -15978 six CVEs, including unauthenticated RCE in /load_lora_adapter_from_tensors

Beri points out that the CERT/CC advisories listed no vendor patch at the time of publication, and that he could only confirm the fix for the March flaws (v0.5.10, according to third-party trackers). In other words: if your company self-hosts SGLang, the pattern is insecure deserialization and exposed admin ports, and several mitigations depend on your configuration.

What to check today if you use SGLang: inventory processes, versions and listening interfaces; SGLANG_USE_PICKLE_IPC=false (not enough on its own) and bind --dist-init-addr to loopback; block /load_lora_adapter_from_tensors and /update_weights_from_disk if unused; restrict /server_info, which can return API keys; always configure API keys; search inference logs for keys and tokens, redact them and rotate them.

What It Means for a Company That Buys or Uses AI

Takeaway: "confidential inference" is a property of the hardware, not of the software running on top of it. If you hire a provider that promises privacy through TEEs, ask them in writing which engine and version they use, how fast they patch critical CVEs, whether their attestation rejects vulnerable builds, and whether they give you a version manifest. If you self-host, treat the inference engine as a service exposed to the internet: no pickle over the network, no keys in logs, restricted egress, and old deployments shut down completely. The NEAR AI incident started in precisely a legacy deployment.

Sources: Decrypt (Nov 10, 2026), Rajesh Beri's analysis (Nov 11, 2026) based on the CERT/CC advisories and the Cloud Security Alliance note. NEAR AI's original report was not consulted directly.

Carlos Montiel
Enterprise AI Solutions Architect
Specialist in LLMs, Agents, and Orchestration
guatemalia.com/#contacto · info@guatemalia.com

Need to implement AI in your company?

Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies across Guatemala and Latin America. Reach out for a consultation.

Contact Carlos Montiel

info@guatemalia.com