/

CVE-2026-62283

Severity:

CRITICAL RISK

(9.9)

IDOR (CWE-639) in Nezha WebSocket Terminal Sessions

CVE-2026-62283

Deferred

Vulnerability type

Category:

Broken Object Level Authorization (IDOR)

CWE:

CWE-639, CWE-862

Impact:

Unauthorized terminal access, file access, and remote command execution

Severity:

CRITICAL RISK

(9.9)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Nezha contains an insecure direct object reference in WebSocket terminal and file-manager sessions. An authenticated member who obtains another user's live stream identifier may attach to that session, read or modify files, and execute shell commands on the target server.

Affected context

The issue occurs in Nezha deployments where stream identifiers created for terminal or file-manager sessions are not associated with their creating user. The affected WebSocket endpoints validate that a supplied UUID exists but may not verify that the requesting authenticated user owns the corresponding stream. Exploitation depends on obtaining a valid, active identifier through exposed logs, browser history, referer data, telemetry, or another information-leak path.

Exploit preconditions

  • Attack surface: Authenticated WebSocket endpoints for terminal and file-manager sessions
  • Required access: A valid authenticated account with member-level privileges
  • Required information: A live stream UUID belonging to another user's session
  • Trigger point: Supplying the obtained identifier to the terminal or file WebSocket endpoint
  • Why exploitation is possible: Authorization checks confirm identifier existence without binding the stream to its creating user or enforcing equivalent ownership controls

Why this happens

The underlying flaw is a missing object-level authorization check. Stream identifiers are created as session references, but the application does not retain or enforce a reliable relationship between each stream and its authorized user when the stream is later accessed. This maps primarily to CWE-639: Authorization Bypass Through User-Controlled Key, with CWE-862: Missing Authorization also applicable. Treating possession of a valid identifier as sufficient authorization allows one authenticated user to reach another user's live session.

Potential impact

  • An attacker could attach to another user's terminal session
  • An attacker could execute shell commands on the associated server
  • An attacker could read, create, modify, or delete files through the file manager
  • An attacker could alter monitored systems or disrupt operational workloads
  • Sensitive credentials, configuration data, or application secrets could be exposed
  • Compromised servers could be used for lateral movement or persistence

General mitigation guidance

Mitigation typically focuses on making authorization server-side, object-specific, and independent of identifier secrecy.

Common defensive patterns include:

  • Bind every stream identifier to its creating user, tenant, role scope, and target resource
  • Enforce ownership or explicit permission checks before establishing WebSocket connections
  • Treat stream UUIDs as references rather than bearer credentials
  • Use short-lived, single-purpose session tokens with revocation and rotation controls
  • Minimize exposure of identifiers in logs, browser history, referer headers, and telemetry
  • Apply least privilege to member roles and monitored-server accounts
  • Separate terminal execution permissions from read-only monitoring and file access
  • Invalidate streams promptly when sessions end, users log out, or authorization changes

How teams detect issues like this

Organizations commonly detect this class of issue through:

  • Static analysis and code review rules requiring ownership checks for identifier-based resource access
  • Review of WebSocket handshake handlers for existence-only validation
  • Tests that attempt cross-user access using valid identifiers from separate accounts
  • Authorization policy checks confirming user, tenant, role, and target-resource binding
  • Audit monitoring for terminal or file sessions accessed by users who did not create them
  • Logging of denied and successful stream attachment attempts without recording sensitive tokens
  • Automated security testing that models authenticated object-level authorization failures

Sources

SourceLink
github.comgithub.com/nezhahq/nezha/commit/6661d6a7fc1c269f55c7f4e775082ad23fbe0f54
github.comgithub.com/nezhahq/nezha/releases/tag/v2.0.10
github.comgithub.com/nezhahq/nezha/security/advisories/GHSA-q6xx-5vr8-p898

Frequently asked

questions

Yes. An attacker generally needs network access to the Nezha service, valid authentication, and a live stream identifier from another user's terminal or file-manager session.

Not necessarily. The described issue affects an authenticated RoleMember when that user can obtain a valid stream UUID and reach the relevant WebSocket endpoints.

Enforce server-side ownership and permission checks for every stream access, binding each identifier to the authorized user, tenant, role, and target resource rather than relying on UUID secrecy.

Add cross-user authorization tests, minimize identifier exposure, use short-lived revocable session references, and apply least privilege to terminal, file, and operational roles.

Find out what's already
exploitable in your codebase.