CVE-2026-53522: Nezha Monitoring Resource Exhaustion via Unbounded WebSocket Streams
Nezha Monitoring, a self-hosted server monitoring tool, contains a resource exhaustion vulnerability in versions 1.0.0 through 2.1.x. Two API endpoints that establish persistent WebSocket connections to monitored servers fail to implement any limits on how many concurrent connections a single authenticated user can create. An attacker with valid credentials can repeatedly call these endpoints to exhaust server memory and crash the monitoring dashboard, disrupting visibility into your infrastructure.
Source data · NVD / CISA · public domain
- CVSS
- 3.1 · 6.5 MEDIUM · CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Weaknesses (CWE)
- CWE-770
- Affected products
- 0 configuration(s)
- Published / Modified
- 2026-06-12 / 2026-06-17
NVD description (verbatim)
Nezha Monitoring is a self-hostable, lightweight, servers and websites monitoring and O&M tool. From version 1.0.0 to before version 2.2.0, the Nezha dashboard exposes two endpoints that create long-lived WebSocket streams to monitored agents: POST /api/v1/terminal → createTerminal() (terminal.go:27-67) and POST /api/v1/file → createFM() (fm.go:28-67). Both call rpc.NezhaHandlerSingleton.CreateStream(streamId, ...) which inserts a new ioStreamContext into an unbounded map[string]*ioStreamContext (s.ioStreams in io_stream.go:59-67). There is no per-user rate limit, no global semaphore, and no per-server connection cap. This issue has been patched in version 2.2.0.
2 reference(s) · View on NVD →
SEC.co analysis · AI-assisted, reviewed against source
Technical summary
The vulnerability exists in two dashboard endpoints—POST /api/v1/terminal and POST /api/v1/file—that open WebSocket streams to monitored agents via rpc.NezhaHandlerSingleton.CreateStream(). Each call inserts an ioStreamContext into an unbounded map without rate limiting, global semaphores, or per-server connection caps. An authenticated user can trigger unlimited stream creation, causing unbounded memory consumption and eventual denial of service. The flaw is rooted in io_stream.go's unrestricted map growth (lines 59-67) combined with the absence of connection pooling or throttling logic in both terminal.go and fm.go handlers.
Business impact
An insider or attacker with compromised dashboard credentials can disable monitoring visibility by crashing the Nezha dashboard. In distributed infrastructure deployments, loss of the monitoring plane prevents detection of real infrastructure incidents, delays incident response, and creates a window for undetected compromise. Organizations relying on Nezha for compliance reporting or SLA verification may also face documentation gaps during outages.
Affected systems
Nezha Monitoring versions 1.0.0 through 2.1.x are vulnerable. The fix is available in version 2.2.0 and later. Any Nezha installation exposed to users with dashboard authentication—whether internal staff or federated identity—is at risk. Deployments in high-trust network segments are lower-risk than those accessible from less-trusted networks, but credential compromise remains a viable attack vector.
Exploitability
Exploitation requires valid Nezha dashboard credentials (PR:L per CVSS vector), but no special complexity or user interaction. An authenticated attacker can invoke the vulnerable endpoints via HTTP/WebSocket with minimal effort. No exploit code is required; a simple loop making repeated API calls suffices. The barrier to exploitation is primarily credential acquisition, not technical sophistication. However, the attack is not yet in the wild and carries no known active exploitation.
Remediation
Upgrade Nezha to version 2.2.0 or later, which patches the unbounded stream creation by introducing connection limits and rate-limiting logic. Verify the upgrade against the official Nezha release notes and changelog. During patching, temporarily restrict dashboard access via network segmentation or WAF rules to reduce credential exposure risk. After patching, audit WebSocket connection logs for signs of prior exhaustion attempts.
Patch guidance
Obtain version 2.2.0 from the official Nezha repository. Review the patch release notes to confirm remediation scope. In production, plan a maintenance window to restart the Nezha service cleanly after upgrade; WebSocket connections will briefly disconnect during the restart, which is expected. Test the upgrade in a staging environment first, validating that all monitored agents reconnect and that terminal/file management endpoints function normally. No database migration or configuration change is required for this patch.
Detection guidance
Monitor Nezha dashboard logs for repeated stream creation from a single user within short time windows. Alert on rising ioStreams map size (if metrics are exposed) or memory growth correlated with API calls to /api/v1/terminal or /api/v1/file. Network-level detection: look for a single source IP repeatedly opening WebSocket connections to the dashboard on ports typically used by Nezha (default 8008 for HTTP, verify for your deployment). Check for unusual authentication patterns or credential use outside normal business hours or from unexpected locations.
Why prioritize this
This vulnerability scores CVSS 6.5 MEDIUM because it requires authentication and causes only availability impact, not confidentiality or integrity breaches. However, it directly threatens operational visibility in monitoring infrastructure, making it more urgent in practice than the score suggests. Prioritize patching if your Nezha dashboard is accessible to less-trusted users, has shared or federated credentials, or if you have recent evidence of suspicious credential activity. Organizations with air-gapped or strictly role-limited Nezha deployments can schedule patching in normal change windows.
Risk score, explained
The CVSS 3.1 score of 6.5 reflects attack vector network (reachable over the network), low attack complexity (no special conditions required), and requirement for low-privilege authentication. The primary impact is availability (denial of service via resource exhaustion), hence the A:H rating. The score does not weigh the operational criticality of losing monitoring, which is context-dependent; your organization may internally prioritize this higher if monitoring loss creates compliance violations or cascades to undetected production incidents.
Frequently asked questions
Do I need Nezha dashboard credentials to exploit this?
Yes, the vulnerability requires authenticated access to the dashboard (PR:L). However, if your Nezha instance has weak or shared credentials, or if credentials are compromised via other means, that barrier is removed. Review who has dashboard access and rotate credentials if exposure is suspected.
What monitoring should I put in place until we patch?
Log and alert on repeated /api/v1/terminal and /api/v1/file POST requests from the same user or IP within short time windows. Monitor dashboard process memory usage for unexplained spikes. If Nezha exports metrics (Prometheus, etc.), track the ioStreams map size. Configure a WAF rule or rate limiter in front of the dashboard to cap requests per user per minute if possible.
If my Nezha is only accessible to internal staff, am I at high risk?
Risk is lower if access is tightly controlled and your staff accounts are well-protected. However, insider threats, credential theft, or lateral movement from compromised systems can still grant an attacker dashboard access. Patching remains important, but you have some flexibility in scheduling if your change control process is slow.
Will upgrading to 2.2.0 break any integrations or require reconfiguration?
The patch addresses only the connection limit logic and should not require configuration changes or break integrations. Test in staging first, and expect brief WebSocket reconnections during the service restart. Check the official Nezha release notes and your vendor advisory for any version-specific caveats.
This analysis is based on the published CVE record and vendor advisory. No exploit code or weaponized proof-of-concept is provided. Security teams should verify patch version numbers and applicability against their specific Nezha deployment version and configuration. Internal risk assessment should account for your organization's credential security posture, network segmentation, and operational dependence on Nezha visibility. This analysis does not constitute professional security advice; consult your security team or a professional services firm for guidance tailored to your environment. Source: NVD (public-domain), retrieved 2026-07-20. Analysis generated by SEC.co (claude-haiku-4-5).
Weaknesses (CWE)
Related vulnerabilities
- CVE-2026-10533MEDIUMOpenShift ResourceQuota Bypass Leads to API Server DoS
- CVE-2026-10740MEDIUMs2n-quic Memory Allocation DoS – QUIC CRYPTO Frame Reassembler
- CVE-2026-1500MEDIUMGitLab Authenticated Denial of Service via Malicious File Upload
- CVE-2026-24720MEDIUMQNAP File Station 6 Resource Exhaustion Vulnerability
- CVE-2026-28237MEDIUMAMD uProf Resource Exhaustion Vulnerability – Patch Guidance
- CVE-2026-36499MEDIUMOpen vSwitch Thread Allocation DoS Vulnerability
- CVE-2026-40898MEDIUMquic-go HTTP/3 Trailer Memory Exhaustion DoS
- CVE-2026-40990MEDIUMSpring Cloud Function OOM Denial-of-Service Vulnerability