Confidential Computing Didn't Stop the NEAR AI Breach: What the SGLang RCE Teaches About AI Inference Security
NEAR AI's November 2026 breach is a clean case study in a mistake that is easy to make: treating a hardware trust boundary as if it also secured the software running inside it. An attacker exploited a remote code execution (RCE) flaw in SGLang, the open-source inference engine NEAR AI runs on its servers. Confidential computing did what it promises. It kept the operator and the host out. It had no say over a bug in the code executing inside the enclave.
If you buy, host or build AI inference, the practical answer is this: a trusted execution environment (TEE) protects data from whoever operates the machine, not from a vulnerable inference server, a weak neighbour service or an exposed log file. You still have to patch, segment and test the software stack like any other internet-facing service.
Key Takeaways
- NEAR AI says an unauthorized party had access from as early as November 8, 2026, through an RCE vulnerability in SGLang, and that it gained code execution on one inference server.
- From there the attacker reached an internal system behind a deprecated Private Chat service and downloaded account details for roughly 100 users, plus data from 18 agents on a legacy deployment that sat outside the confidential computing environment.
- Two NEAR AI Cloud customers had API keys exposed in logs. Those keys have been revoked.
- NEAR AI's own wording is the lesson: confidential computing "does not protect against a vulnerability in the software running inside the environment."
- Defenders should treat inference engines, agent runtimes and the services around an enclave as ordinary attack surface and pentest them accordingly.
What happened, according to NEAR AI
NEAR AI published its security incident report on November 9, 2026, and updated it on November 25. The company says it identified and contained unauthorized access to part of its infrastructure, closed the access, replaced affected credentials, fixed the vulnerability and restored access to NEAR AI Cloud.
The update changed the scope. NEAR AI established that, from as early as November 8, an unauthorized party had access to two servers hosting older IronClaw and OpenClaw agents. That access allowed them to read data belonging to every agent on those servers, running or stopped. The potential exposure is therefore wider than the 18 agents whose data NEAR AI had earlier confirmed were retrieved. Both servers were shut down on November 21, and the company emailed the owners it could identify.
The confirmed pieces, in the order an attacker would have met them:
- Initial access. An RCE in SGLang gave code execution on one inference server.
- Lateral movement. From that server the attacker reached an internal system behind the previously deprecated Private Chat product and downloaded account details (email addresses, names and, for some accounts, plan and balance information) for about 100 users.
- Agent data. Data was retrieved from 18 agents on a legacy deployment of NEAR AI Agents that was outside the confidential computing environment. For those agents it included chat history, settings and logs.
- Secrets in logs. Two Cloud customers had NEAR AI Cloud API keys exposed in logs.
- Visibility into live traffic. On November 8, the attacker could also have observed user requests being processed on the compromised server, including requests running in confidential mode.
NEAR AI says it found no indication that stored Private Chat conversations or uploaded files were accessed. That distinction matters, and it is worth reading the report for exactly what is and is not claimed rather than relying on summaries.
What the enclave protected, and what it didn't
Confidential computing uses hardware-backed isolation so that data in use is protected from the cloud operator, the hypervisor and the host operating system. NEAR AI describes the limit plainly in its report: the protection covers the operator and the host, not a vulnerability in the software running inside the environment.
That is not a flaw in the technology. It is a scoping problem. A TEE gives you a smaller trusted computing base for the question "can the host read my data?" It does not answer the question "can someone who exploits my inference server read my data?" Once an attacker has code execution inside the enclave boundary, they are inside the thing the boundary was built to protect. As NEAR AI put it, the SGLang bug let the party run code inside one inference server and see requests in processing on that server, confidential ones included.
Security vendor Bonfy reached a similar conclusion in its analysis of the incident: the data that leaked was the data the boundary was meant to contain, plus data from agents that were never inside the boundary at all.
| Threat | Does a TEE help? | What actually helps |
|---|---|---|
| Cloud operator or host admin reading memory | Yes, this is the design goal | Attestation, key release tied to measurement |
| RCE in the inference engine (SGLang, vLLM and similar) | No | Patching, network isolation, least privilege, runtime monitoring |
| Legacy or deprecated services running outside the enclave | No | Decommissioning, inventory, same hardening as production |
| API keys and tokens written to logs | No | Log redaction, secret scanning, short-lived credentials |
| Lateral movement from an inference node to internal systems | No | Segmentation, per-service identity, egress controls |
Why inference engines are a fresh attack surface
Inference servers sit in an awkward spot. They are open-source projects that move fast, they accept untrusted input by design (prompts, multimodal payloads, tool-call parameters), and they often run with broad access to GPUs, model weights, and internal networks. Some teams deploy them behind an API gateway and assume that is enough.
An RCE in that layer is high value for an attacker for three reasons:
- Request visibility. The server processes plaintext prompts and responses in memory, which is exactly where the sensitive content lives.
- Credential adjacency. Inference nodes tend to hold or log service tokens, agent tokens and upstream API keys. NEAR AI's report shows two customers' keys ended up in logs.
- Trust inheritance. Because the node is "inside the secure environment," internal systems often trust it more than they should.
We covered a related pattern when AI agents themselves found and exploited a path traversal flaw in medical imaging software; see AI agents found a path traversal zero-day in 11 minutes. The common thread is that AI infrastructure is ordinary software with ordinary bugs, but it holds unusually sensitive data. Our piece on MCP servers as a new attack surface makes the same argument for the tool layer.
The legacy deployment problem
One detail in the report deserves more attention than it usually gets. Part of the exposed data came from a legacy deployment of NEAR AI Agents that sat outside the confidential computing environment, and the Private Chat system the attacker reached had been deprecated. Old agent hosting and retired products are where inventory gaps live.
The pattern is familiar from conventional breaches: the hardened, well-documented core holds, and the forgotten system next to it does not. Your TEE-protected production path can be genuinely strong while a pre-migration agent host holds chat histories and logs with no such protection.
Questions to ask about your own estate:
- Is there a complete inventory of every service that handles prompts, agent state or logs, including deprecated ones?
- Do old agent runtimes receive the same patches as the current one?
- When a product is "deprecated," is the infrastructure actually shut down, or only hidden from the UI?
- Can a compromised inference node reach internal databases or admin systems?
Response timeline: what NEAR AI did well
It is fair to note what the company did right. According to the report, on detection it revoked all active sessions and administrative credentials, replaced all agent tokens, took Private Chat offline, patched the SGLang vulnerability across all inference servers, completed credential rotation and a forensic review, and notified affected users. It reported the vulnerability to the SGLang project, and it published the incident within a day of the initial report, then updated it as the scope grew. The code, dependencies and deployment configuration for its confidential inference stack remain public so others can verify what is running.
The update also shows how incident scope tends to expand. Early confirmed exposure covered 18 agents; the November 25 update acknowledged that everything on two servers could have been read. Plan for that: when you scope an incident, assume the blast radius is the whole host until logs prove otherwise.
What to do this week
If you run SGLang or another inference engine:
- Update to the latest patched release and check the project's security advisories. NEAR AI says it reported its finding upstream to the SGLang project.
- Keep the inference port off the public internet. Put an authenticated gateway in front and restrict who can reach the engine directly.
- Run the inference process as an unprivileged user in a container with a read-only filesystem and no route to internal admin systems.
- Restrict egress. An inference node rarely needs to initiate connections to the wider network.
If you use a hosted "confidential" AI provider:
- Ask what is inside the attested boundary and what is not. Agent hosting, logging pipelines, billing and legacy products may all be outside it.
- Ask how the vendor patches the inference engine and how fast it can roll out a fix across all servers.
- Treat any API key you ever passed to the service as potentially exposed after an incident and rotate it.
For every AI stack:
- Scrub secrets from logs. Tokens and keys should never reach log storage in plaintext.
- Use short-lived, scoped credentials for agents so a stolen token has limited value.
- Segment inference, agent hosting and account systems so one compromise does not reach the others.
- Decommission deprecated services completely and verify they are gone.
- Include the inference layer in your penetration test scope, not only the web app in front of it.
How an attacker-style test would look
A realistic assessment of an inference stack goes beyond scanning the front door. It enumerates every service that touches prompts and agent state, fingerprints the inference engine and its version, checks whether the engine's ports are reachable from outside the intended network, and looks for secrets in logs and configuration. Then it tests what an RCE on one node would reach: internal databases, other agents' data, credentials in environment variables, and anything that trusts the node by network position.
That last step is what the NEAR AI incident illustrates. The question is rarely "can the bug be exploited" in isolation; it is "what does the attacker get after the first foothold." Agentic pentesting platforms, including SecurityInfinity, are built to chain those steps the way a real intruder would, which is the part conventional vulnerability scans do not cover.
The broader lesson
Hardware isolation, signed attestations and open-source verification are valuable. NEAR AI's decision to keep its confidential inference stack's code and deployment configuration public is a good example of verifiability. But the incident reinforces an old rule: a security boundary is only as strong as the weakest code inside it. "Confidential" describes who can see the data from the outside, not whether the software processing it is exploitable.
Frequently asked questions
Does confidential computing prevent breaches like this one?
No. It protects data from the operator and host. NEAR AI states it does not protect against a vulnerability in software running inside the environment, which is how the SGLang RCE gave the attacker access to requests in processing.
What was exposed in the NEAR AI incident?
According to NEAR AI, account details (emails, names and, for some, plan and balance information) for about 100 users; chat history, settings and logs from 18 agents on a legacy deployment; and API keys for two Cloud customers exposed in logs. The November 25 update says everything on two older agent servers could potentially have been read. The company found no indication that stored Private Chat conversations or uploaded files were accessed.
Should I stop using confidential AI inference?
Not necessarily. It still reduces risk from the operator and host. Use it as one layer, and verify the vendor patches the inference engine quickly, keeps legacy systems inside the same protections or retires them, and keeps secrets out of logs.
How do I check whether my own inference server is exposed?
Confirm the engine version against upstream advisories, check from outside your network that the inference port is not reachable, review logs for secrets, and have the inference layer included in a penetration test that tests lateral movement from a compromised node.
What should I do if I used NEAR AI?
If you are unsure whether your agent was affected, NEAR AI asks you to contact security@near.ai. Rotate any API keys you used with the service as a precaution.