SGLang RCE Breach Hits NEAR AI: Data from 100 Users, 18 Agents Exposed

NEAR AI is grappling with a serious security breach after a remote code execution (RCE) flaw in its open-source inference engine, SGLang, was exploited. Attackers leveraged the vulnerability to run code on a NEAR AI inference server, gaining access to both confidential-mode requests and internal systems. The breach was confirmed earlier this week.

How the Attack Unfolded

The flaw allowed attackers to reach into a trusted execution environment (TEE), which NEAR AI uses to process sensitive, confidential-mode data—even intending to shield user requests from everyone, including its own engineers. However, because SGLang runs inside this environment, the flaw gave attackers entry into requests that should’ve remained private. While the company has since closed off this access, too much damage had already been done.

From the compromised server, attackers accessed Private Chat—an older product line NEAR AI had already deprecated. Nearly 100 user accounts were impacted: names, email addresses, and for some users, plan and balance details were stolen. Fortunately, no stored conversations or uploaded user files seem to have been touched.

Impact on AI Agents, API Keys, and Response

Older deployments of NEAR AI Agents—specifically 18 agents that weren’t shielded by the TEE—were also compromised. These contained agent settings, logs, and chat histories. In addition, two customers had their NEAR AI Cloud API keys exposed through logs. Those were revoked immediately.

NEAR AI has taken a sweeping set of actions in response. It revoked all active sessions and administrative credentials, replaced agent tokens, and pulled Private Chat offline. The company deployed patches to all inference servers affected by the SGLang flaw, rotated remaining credentials, and carried out a full forensic review. The incident was reported to the SGLang project, though no specific CVE number or affected SGLang versions have been publicly disclosed yet.

Users whose account details or agents were definitely accessed have been contacted directly. Others, including those whose data may have passed through the affected server last Sunday, were told there’s no need to take action unless they receive their own notification.

One lingering concern: it’s not yet clear whether chats handled in confidential mode via NEAR AI’s TEE—including those used by integrations like Brave’s Leo assistant—were exposed. NEAR AI hasn’t confirmed whether any of those sessions were processed through the affected server.

In short: the breach exposed user data, agent histories, and API keys, but appears to have avoided more severe contamination of private chat logs or uploaded files.

This incident is a stark reminder that even ‘trusted’ environments like TEEs offer no protection if the software running within them is vulnerable. What matters at least as much as architecture is rigorous auditing, version control, and rapid patching. Going forward, users should check individual account notices and keep an eye on any suspicious messages about their account or balance, especially if they weren’t prompted.