Executive brief
Nezha Monitoring is a tool used to manage and monitor servers and websites. A security flaw allows any registered user to execute arbitrary commands on every server managed by the system, including those belonging to other users or administrators. This could lead to a total compromise of all monitored infrastructure and the theft of sensitive data from those servers.
Technical details
A cross-tenant Remote Code Execution (RCE) vulnerability exists in Nezha Monitoring versions 1.4.0 through 2.0.7. The issue stems from the '/api/v1/cron' endpoints being accessible via 'commonHandler' (any authenticated user) rather than 'adminHandler'. Additionally, a logic flaw in 'ServerShared.CheckPermission' allows users to bypass server ownership checks by submitting an empty server list. When 'Cover' is set to 'CronCoverAll', the scheduler iterates through the global 'ServerShared' map and pushes the command to every agent in the deployment, regardless of ownership. Attackers can exfiltrate command output by configuring a 'NotificationGroup' with a webhook they control. This has been patched in version 2.0.8.
Affected products
- nezhahq Nezha Monitoring 1.4.0 to 2.0.7
Timeline
- 2026-05-17: advisory: GitHub Security Advisory published
- 2026-06-12: disclosed: NVD publication date
- 2026-05-17: patched: Fix released in version 2.0.8