An SGLang flaw let an attacker into NEAR AI through inference
NEAR AI says a remote code execution flaw in SGLang, the open source inference engine running on its servers, exposed account details for about 100 users, data from 18 legacy agents and two customers' API keys. Here is what that means for teams that self host models.
Contents4 sections
On 9 November 2026, NEAR AI published a security incident report about unauthorized access to part of its infrastructure. The entry point was a remote code execution vulnerability in SGLang, the open source inference engine running on its servers. Every team that self hosts models should read it as a report about their own stack.
What NEAR AI reported
According to the report, the attacker gained code execution on one inference server and, from there, access to the company's infrastructure. The confirmed impact, in the report's own scope:
- Account details (email addresses, names, and for some accounts plan and balance information) for approximately 100 users, downloaded from an internal system behind the previously deprecated Private Chat product.
- Chat history, settings and logs from 18 agents on a legacy deployment of NEAR AI Agents that was not running in the company's confidential computing (TEE) environment.
- NEAR AI Cloud API keys belonging to two Cloud customers, exposed in logs. Those keys have been revoked.
- On 8 November 2026, the attacker could also have observed user requests processed on the accessed server, including requests running in confidential mode.
NEAR AI says it found no indication that stored Private Chat conversations or uploaded files were accessed. Its response, as listed in the report: it revoked all active sessions and administrative credentials, replaced all agent tokens, took Private Chat offline, deployed a fix for the SGLang vulnerability across all inference servers, completed rotation of the remaining credentials and a full forensic review, and reported the vulnerability to the SGLang project. The report does not name the flaw, a CVE or an affected SGLang version, and we will not guess.
The inference engine is an application server
Most threat models for RAG and agent systems put the model server in the trusted infrastructure box and spend their attention on prompt injection, tool permissions and retrieval leaks. Those matter. But an inference engine is a large Python application with network listeners, internal messaging and management endpoints, and it changes as fast as new models ship, which is faster than most teams review it.
SGLang has public history here. On 12 March 2026, the GitHub Advisory Database published `CVE-2026-3059`, rated critical at 9.8: the multimodal generation module was vulnerable to unauthenticated remote code execution through its ZMQ broker, which deserialized untrusted data with pickle.loads() without authentication. Versions up to and including 0.5.9 are listed as affected and 0.5.10 as patched. This may not be the flaw NEAR AI hit. It does show that the class of bug is known, and that a serving engine exposes more than the OpenAI compatible endpoint your application calls.
Our position: treat vLLM, SGLang, TGI or any other serving engine exactly like a database server. It lives on a private network, it is reachable only from the services that call it, it holds no credentials it does not need, and it is patched on a schedule that a named owner on your team is responsible for.
Where confidential computing stops
NEAR AI is direct about this, and we think it is the most useful part of the report. It states that confidential computing protects data from the operator and the host, and that it does not protect against a vulnerability in the software running inside the environment. An enclave can attest what is running. It cannot make what is running safe.
The second lesson is about old deployments. The 18 agents sat on a legacy deployment outside the TEE. The user records came from a system behind a deprecated product. Neither was the flagship. Any team that has shipped an AI feature more than once has a version one still running somewhere, with older dependencies, broader credentials and fewer people watching it.
The third lesson is logs. Two customers had API keys sitting in logs. Agent and RAG systems log generously because they are hard to debug, and that logging captures headers, tool arguments and full payloads. Over time the log store becomes a secret store that nobody designed and nobody protects like one.
What we would do in the next 30 days
- Map the serving surface. For every self hosted model, list every port the process opens, not only the API port. Confirm none of them is reachable from the public internet or from services that never call the model.
- Track the engine like a dependency. Pin the inference engine version, subscribe to its security advisories, and set a patch window measured in days.
- Strip credentials from the inference host. The model server should not hold database passwords, cloud admin keys or customer API keys. If it is compromised, the blast radius should end at the GPU.
- Redact before you log. Remove authorization headers, API keys and tokens at the log handler, before anything is written.
- Inventory the legacy deployments. Find every older agent, prototype and deprecated product still running. Bring each one under the same controls as the current system or shut it down.
- Rehearse rotation. NEAR AI reports that it revoked all active sessions and administrative credentials, replaced all agent tokens and then rotated all remaining credentials. Know how long the same exercise would take you, and run it once before you need it.
For the logging item, a handler level filter in Python is a cheap backstop. Attach it to handlers rather than loggers, because logger filters do not apply to records that propagate up from child loggers.
import logging, re
SECRET = re.compile(r"(sk-[A-Za-z0-9_\-]{16,}|Bearer\s+[A-Za-z0-9._\-]+)")
class RedactSecrets(logging.Filter):
def filter(self, record):
record.msg = SECRET.sub("[REDACTED]", record.getMessage())
record.args = ()
return True
for handler in logging.getLogger().handlers:
handler.addFilter(RedactSecrets())The search on this site runs a self hosted all-MiniLM-L6-v2, so these questions apply to us as well. When we scope an AI system in a Discovery Sprint, the serving layer, its network exposure and its logs are part of the review alongside prompts, tools and retrieval. If you run your own inference for RAG or agents and want that review done properly, see our AI integration work or get in touch.
Baraqix Engineering. Written by the engineers who did the work.
NOTE/11. First published .