GHSA-HPFR-CMGC-F455
Incomplete fix of CVE-2026-59155: DDNS list endpoint still leaks WebhookURL/WebhookRequestBody
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-HPFR-CMGC-F455 divulgada · CVSS 6.5 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Maintainer resolution
Fixed in v2.3.15 https://github.com/nezhahq/nezha/releases/tag/v2.3.15 by commit 36b742a7 https://github.com/nezhahq/nezha/commit/36b742a7e9a81ed782363dd19efd77b7030fbd0f. Affected versions: `>= 2.2.5, < 2.3.15`. Patched versions: `>= 2.3.15`.
Incomplete fix of CVE-2026-59155 (GHSA-ww5p-j6cj-6mqq): DDNS list endpoint still leaks WebhookURL and WebhookRequestBody, which carry the same embedded-secret risk the advisory itself flagged and that the sibling Notification fix does redact
Repository: nezhahq/nezha
Incomplete fix of CVE-2026-59155 (GHSA-ww5p-j6cj-6mqq): DDNS list endpoint still leaks WebhookURL and WebhookRequestBody, which carry the same embedded-secret risk the advisory itself flagged and that the sibling Notification fix does redact
Severity: Low
Vulnerability class: Sensitive information disclosure / incomplete security fix
File/Line: cmd/dashboard/controller/ddns.go:35-38 (listDDNS); model/ddns.go:20-35 (DDNSProfile fields); pkg/ddns/webhook/webhook.go:130-149,151-173,175-188 (reqUrl/reqBody/formatWebhookString); compare cmd/dashboard/controller/notification.go:38-42 (listNotification, the sibling that WAS fully redacted)
Summary
The remediation commit for CVE-2026-59155 (39d398066d, "fix(api): redact third-party credentials in ddns/notification list") added field-zeroing to both listDDNS and listNotification, but zeroed a different, incomplete field set on each side. listDDNS only does `p.AccessSecret = ""; p.WebhookHeaders = ""` (ddns.go:36-37), while listNotification does `n.URL = ""; n.RequestHeader = ""; n.RequestBody = ""` (notification.go:39-41) -- i.e. Notification's URL and RequestBody are treated as sensitive and stripped, but DDNS's structural analogs, WebhookURL and WebhookRequestBody, are left completely intact in the JSON response. This directly contradicts the original advisory's own text, which explicitly said: "The WebhookURL and WebhookHeaders fields may also contain embedded secrets" -- yet the shipped fix only redacted WebhookHeaders, never WebhookURL, and never even considered WebhookRequestBody. That these two fields do carry live secrets is proven by pkg/ddns/webhook/webhook.go: formatWebhookString() (line 175) substitutes `#access_secret#` and `#access_id#` placeholders, and this substitution is applied to WebhookURL query values inside reqUrl() (line 142: `vals[n] = provider.formatWebhookString(v)`) and to WebhookRequestBody inside reqBody() (lines 159 and 167) -- the exact same template mechanism used for WebhookHeaders, which IS redacted. In practice, because the webhook DDNS provider is meant for arbitrary third-party dynamic-DNS APIs, many users hard-code a raw auth token directly into the WebhookURL query string or JSON body (the classic ddclient/dyndns-style 'update URL with embedded password' pattern) rather than using the AccessID/AccessSecret+placeholder indirection, so the live credential sits in cleartext in exactly the two DB columns that GET /api/v1/ddns still echoes verbatim.
Reachability / who can trigger this
Any authenticated admin (RoleAdmin), or any PAT minted by an admin carrying the `nezha:ddns:read` scope, calling `GET /api/v1/ddns` (registered at cmd/dashboard/controller/controller.go with `restScopeMiddleware(model.ScopeDDNSRead)`, no additional admin gate on the route itself). listHandler's post-filter (`filter()` in controller.go -> model.Common.HasPermission in model/common.go:63-82) lets RoleAdmin see every user's DDNS profile in one response (RoleMember is restricted to their own row, matching the original advisory's threat model exactly: 'a compromised admin session or leaked PAT with nezha:ddns:read scope exposes all third-party integration secrets'). Confirmed the fix commit (39d398066d) is the only commit touching ddns.go since, and the gap is present at current HEAD (c726930833937a0aebb2a924064f236faea889f6, 2026-09-26).
Proof of Concept / Reproduction
Method:
1. Reused the existing shallow clone at C:\Users\vatsa\AppData\Local\Temp\claude\D--\59901fa2-b549-40e1-a433-30c8a3d01718\scratchpad\CVE-Hunt-10k\repos\nezhahq__nezha. Confirmed HEAD = c726930833937a0aebb2a924064f236faea889f6 (2026-09-26), matching the claim.
- Read the actual current source at every cited location (not trusting the claim): cmd/dashboard/controller/ddns.go:35-38 (listDDNS zeroes only AccessSecret/WebhookHeaders), cmd/dashboard/controller/notification.go:38-42 (listNotification zeroes URL/RequestHeader/RequestBody -- all three), model/ddns.go:20-35 (WebhookURL, WebhookRequestBody are plain omitempty fields, never redacted), pkg/ddns/webhook/webhook.go:130-188 (formatWebhookString's #access_id#/#access_secret# substitution is applied identically to WebhookURL query values in reqUrl(), to WebhookRequestBody in reqBody(), and to WebhookHeaders -- confirming all three fields are designed to carry the same class of secret material), and cmd/dashboard/controller/controller.go:172 (route is `auth.GET("/ddns", restScopeMiddleware(model.ScopeDDNSRead), listHandler(listDDNS))`, no extra admin gate). All matched the claim exactly.
- Deepened the shallow clone (`git fetch --depth=250 origin`) and located the actual remediation commit 39d398066d8c644fe452f74704e34ada6c7ab61e ("fix(api): redact third-party credentials in ddns/notification list", Ref: GHSA-ww5p-j6cj-6mqq) and inspected its full diff. Its own commit message explicitly names "webhook URLs with embedded bot tokens" as one of the things being fixed, but the diff for ddns.go only adds `p.AccessSecret = ""; p.WebhookHeaders = ""` -- WebhookURL and WebhookRequestBody are never touched. Its own new regression test (TestListDDNS_RedactsCredentials) only asserts AccessSecret/WebhookHeaders are redacted and never sets or checks WebhookURL/WebhookRequestBody, so the gap is invisible to the project's own test suite.
- Also verified the "every user's row is exposed to an admin" reachability sub-claim from source: cmd/dashboard/controller/controller.go's `filter()` (line 348) keeps a row iff `e.HasPermission(ctx)`, and model/common.go's `HasPermission` (line 63) returns `true` unconditionally when `user.Role == RoleAdmin`, only restricting to `user.ID == c.GetUserID()` for non-admins.
- Built the real dashboard from source on this Windows machine: `go build ./cmd/dashboard/` (Go 1.27.0 windows/amd64, CGO_ENABLED=1, gcc/MinGW-w64 present for the cgo go-sqlite3 driver). Produced an unmodified ~85MB nezha-dashboard.exe.
- Ran the binary as a live process (`nezha-dashboard.exe -c data/config.yaml -db data/sqlite.db`) in a scratch working directory, letting it bootstrap its own fresh SQLite DB, generate its own JWT secret, and create its documented first-run `admin`/`admin` account exactly via the real installer code path (cmd/dashboard/main.go initSystem). Server came up listening on 127.0.0.1:8008.
7. Logged in as admin/admin via the real `POST /api/v1/login`, capturing the real `nz-jw
...[truncated for brevity]
Evidence:
GET /api/v1/ddns -- actual server response (verbatim), for the profile created with an embedded secret in WebhookURL/WebhookRequestBody/WebhookHeaders:
{"success":true,"data":[{"id":1,"created_at":"2026-09-28T07:22:18...","updated_at":"2026-09-28T07:22:18...","enable_ipv4":false,"enable_ipv6":false,"max_retries":3,"name":"repro-webhook-ddns","provider":"webhook","webhook_url":"http://ddns-provider.example.com/update?domain=#domain#&ip=#ip#&token=RAW-EMBEDDED-SECRET-TOKEN-4242","webhook_method":2,"webhook_request_type":1,"webhook_request_body":"{\"auth_token\":\"RAW-EMBEDDED-SECRET-TOKEN-4242\",\"domain\":\"#domain#\",\"ip\":\"#ip#\"}","domains":["example.com"]}]}
-> The raw secret "RAW-EMBEDDED-SECRET-TOKEN-4242" is returned in full cleartext in BOTH webhook_url and webhook_request_body. Meanwhile access_id, access_secret, and webhook_headers are completely ABSENT from the response (correctly zeroed+omitted), even though webhook_headers was populated with its own embedded secret at creation. This directly confirms the claimed mechanism: listDDNS's redaction loop only strips AccessSecret/WebhookHeaders and misses the two structurally identical secret-carrying fields.
Control -- GET /api/v1/notification response (verbatim), sibling endpoint, created via POST with the SAME secret value embedded in url and request_body:
{"success":true,"data":[{"id":1,"created_at":"2026-09-28T07:22:35...","updated_at":"2026-09-28T07:22:35...","name":"repro-notification-control","url":"","request_method":2,"request_type":1,"request_header":"","request_body":"","verify_tls":false,"format_metric_units":false}]}
-> url, request_header, and request_body are all blanked to "" -- the identical secret that leaked via DDNS is fully redacted here, proving listNotification's redaction (fixed by the SAME commit) works correctly while listDDNS's does not.
Supporting historical evidence -- `git show 39d398066d`:
Commit message: "GET /api/v1/ddns and /api/v1/notification returned full objects with plaintext credentials (Cloudflare/TencentCloud secrets, webhook URLs with embedded bot tokens, Authorization headers). Redact these fields in the list responses. ... Ref: GHSA-ww5p-j6cj-6mqq"
Diff for cmd/dashboard/controller/ddns.go adds exactly:
for _, p := range ddnsProfiles {
p.AccessSecret = ""
p.WebhookHeaders = ""
}
-- never touching WebhookURL despite the commit message explicitly calling out "webhook URLs with embedded bot tokens", and never touching WebhookRequestBody at all. The commit's own new test (TestListDDNS_RedactsCredentials) only builds a DDNSProfile with AccessSecret/WebhookHeaders set and only asserts those two are empty afterward -- it never populates or checks WebhookURL/WebhookRequestBody.
Build/run proof: `go build -o nezha-dashboard.exe ./cmd/dashboard/` succeeded (Go 1.27.0 windows/amd64, cgo go-sqlite3), producing an 89,503,533-byte unmodified binary; server log showed real startup: "NEZHA>> generated new jwt_secret_key...", "NEZHA>> TSDB is disabled...", and it served real HTTP on 127.0.0.1:8008 for the full login -> create -> list round trips above.
Novelty
All 5 requested checks completed, plus live-code verification. (1) Pulled the full advisory list via paginated gh api (not estimated): exactly 24 published advisories; read the 4 DDNS/credential-adjacent ones in full. (2) Issues: ~10 targeted searches (webhook, ddns+secret/leak/expose/sensitive, redact, WebhookURL, webhook_url, webhook_request_body, CVE/GHSA IDs, "incomplete fix") plus manual scan of all 54 currently-open issue titles; two near-misses (#1219, #1216) read in full, both confirmed to be a different bug (Notification-side data-loss/UX regression from the same fix commit, not DDNS-side disclosure). (3) PRs: same term set with is:pr, confirmed zero open PRs exist in the entire repo right now, and checked merged PRs touching ddns.go (#1237, #1238, #1050 — all unrelated DNS-record-deletion functionality, not redaction). (4) WebSearch: 4 queries; every hit traces back to mirrors/aggregators of the two known GHSAs already reviewed, no independent writeup of the incomplete-redaction gap. (5) Applied the "would the same code fix close both" test to every close candidate — all failed it (different files/functions/mechanisms). Beyond the ask: fetched live HEAD (pushed 2026-09-26, = v2.3.14) for ddns.go, notification.go, model/ddns.go, webhook.go and confirmed the candidate's claims are byte-accurate against current code (exact line numbers for reqUrl/reqBody/formatWebhookString; listDDNS still only zeroes AccessSecret+WebhookHeaders; listNotification zeroes all three of it
...[truncated for brevity]
Closest prior art considered: GHSA-ww5p-j6cj-6mqq / CVE-2026-59155 itself (the original advisory this finding claims is incompletely fixed). Its Details section explicitly flags "WebhookURL and WebhookHeaders...may also contain embedded secrets," but its own Suggested Remediation only lists AccessSecret+WebhookHeaders for DDNS and URL+RequestHeader for Notification (RequestBody isn't mentioned there either, yet was redacted anyway for Notification). The shipped fix (commit 39d398066d) matches that remediation list literally for DDNS but never added WebhookURL or WebhookRequestBody. This is the direct antecedent being extended, not a duplicate — verified by reading it in full. Second-closest is GHSA-6x26-5727-rrm9/CVE-2026-47268 (DDNS webhook blind SSRF, same subsystem/struct fields) but a different mechanism entirely: it's about the dashboard making an outbound request to an attacker URL (egress control), not the list endpoint echoing a stored secret back (ingress/read disclosure) — fixing one would not touch the o
...[truncated for brevity]
Independent skeptical review
Survives hostile review. Verified via three independent channels: (1) local shallow clone pinned exactly at the cited HEAD c7269308...; (2) a live raw.githubusercontent.com fetch of ddns.go/notification.go at that exact commit (independently confirmed as the actual current nezhahq/nezha master HEAD via the GitHub API, ruling out a stale/tampered local clone); (3) a fresh, passing empirical Go test against the real compiled package proving a non-admin-owned secret embedded in WebhookURL/WebhookRequestBody is returned verbatim to a different-UserID RoleAdmin reader while AccessSecret/WebhookHeaders are correctly redacted in the same call. All cited line numbers (ddns.go:35-38, model/ddns.go:20-35, webhook.go:130-149/151-173/175-188, notification.go:38-42) are exactly accurate. The original advisory GHSA-ww5p-j6cj-6mqq's own text does say "The WebhookURL and WebhookHeaders fields may also contain embedded secrets," directly supporting the "contradicts the advisory's own text" framing (the advisory's suggested-remediation list itself omitted WebhookURL, plausibly explaining, but not excusing, why the fix commit 39d398066d — confirmed real via GitHub API despite not appearing as a discrete node in the shallow clone's squashed local history — missed it). Corroborating detail beyond the original submission: updateDDNS unconditionally overwrites WebhookURL/WebhookRequestBody on every edit (no preserve-if-empty special-casing, unlike AccessSecret/WebhookHeaders), and the project's own
...[truncated for brevity]
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/nezhahq/nezha |
Sin parche | — | — | v1.14.14 no afectada |
2.3.15Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/nezhahq/nezha/security/advisories/GHSA-hpfr-cmgc-f455Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
