{"id":"CVE-2026-101090","aliases":["EUVD-2026-88025","GHSA-62gj-x2f3-j2wj","GHSA-rf68-8gjr-36q7","GO-2026-6486"],"status":"published","title":"Nezha through 2.2.3 Host Header Injection via OAuth2 redirect_uri","description":"Nezha 2.2.3 contains a Host header injection regression in the OAuth2 redirect endpoint. When the new optional dashboard_host setting is empty, /api/v1/oauth2/{provider} (cmd/dashboard/controller/oauth2.go) reflects the attacker-supplied HTTP Host header into the redirect_uri sent to the identity provider instead of falling back to the configured install_host. An attacker who induces a victim to begin OAuth2 login via a request that reaches Nezha with a forged Host header can cause an attacker-controlled callback URL to be used as the redirect_uri; if the OAuth2 provider accepts it, the victim's authorization code is delivered to the attacker origin, allowing the attacker to complete the OAuth2 login/binding flow and take over the account. This regresses the fix for GHSA-9rc6-8cjv-rcvx and is configuration-dependent (dashboard_host empty). At the time of the advisory no patched version was available.","severity":{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-08","score":0.00443,"percentile":0.38791,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-601"],"published":"2026-09-15T19:50:08Z","modified":"2026-10-28T02:30:32Z","affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/nezhahq/nezha","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.2.3"},{"last_affected":"2.2.3"}]}],"versions":["2.2.3"]},{"source":"osv","ecosystem":"Go","package":"github.com/nezhahq/nezha","versions":["2.2.3"]},{"source":"osv","ecosystem":"Go","package":"github.com/nezhahq/nezha","ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}]}],"products":[{"vendor":"nezhahq","product":"nezha"}],"references":[{"url":"https://github.com/nezhahq/nezha/security/advisories/GHSA-rf68-8gjr-36q7","tags":["vendor-advisory","exploit","advisory","web"]},{"url":"https://www.vulncheck.com/advisories/nezha-through-2.2.3-host-header-injection-via-oauth2-redirect-uri","tags":["third-party-advisory","advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-101090","tags":["advisory"]},{"url":"https://github.com/advisories/GHSA-62gj-x2f3-j2wj"},{"url":"https://github.com/nezhahq/nezha/commit/38824dbc11a63964c5b9296ae4c68e62b34fa04b","tags":["web","fix"]},{"url":"https://github.com/advisories/GHSA-rf68-8gjr-36q7"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/101xxx/CVE-2026-101090.json","tags":["advisory"]},{"url":"https://github.com/nezhahq/nezha","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2026-101090","title":"Nezha through 2.2.3 Host Header Injection via OAuth2 redirect_uri","description":"Nezha 2.2.3 contains a Host header injection regression in the OAuth2 redirect endpoint. When the new optional dashboard_host setting is empty, /api/v1/oauth2/{provider} (cmd/dashboard/controller/oauth2.go) reflects the attacker-supplied HTTP Host header into the redirect_uri sent to the identity provider instead of falling back to the configured install_host. An attacker who induces a victim to begin OAuth2 login via a request that reaches Nezha with a forged Host header can cause an attacker-controlled callback URL to be used as the redirect_uri; if the OAuth2 provider accepts it, the victim's authorization code is delivered to the attacker origin, allowing the attacker to complete the OAuth2 login/binding flow and take over the account. This regresses the fix for GHSA-9rc6-8cjv-rcvx and is configuration-dependent (dashboard_host empty). At the time of the advisory no patched version was available.","status":"published","published":"2026-09-27T20:50:00.857Z","modified":"2026-09-28T13:00:01.476Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical","assessor":"cna"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"cna"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:20:09.448255Z"}],"euvd":[{"id":"EUVD-2026-88025","description":"Nezha 2.2.3 contains a Host header injection regression in the OAuth2 redirect endpoint. When the new optional dashboard_host setting is empty, /api/v1/oauth2/{provider} (cmd/dashboard/controller/oauth2.go) reflects the attacker-supplied HTTP Host header into the redirect_uri sent to the identity provider instead of falling back to the configured install_host. An attacker who induces a victim to begin OAuth2 login via a request that reaches Nezha with a forged Host header can cause an attacker-controlled callback URL to be used as the redirect_uri; if the OAuth2 provider accepts it, the victim's authorization code is delivered to the attacker origin, allowing the attacker to complete the OAuth2 login/binding flow and take over the account. This regresses the fix for GHSA-9rc6-8cjv-rcvx and is configuration-dependent (dashboard_host empty). At the time of the advisory no patched version was available.","status":"published","published":"2026-09-27T20:50:00Z","modified":"2026-09-28T13:00:01Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"updated_at":"2026-11-02T17:27:53.908541Z"}],"ghsa":[{"id":"GHSA-62gj-x2f3-j2wj","title":"Nezha 2.2.3 contains a Host header injection regression in the OAuth2 redirect endpoint. When the...","description":"Nezha 2.2.3 contains a Host header injection regression in the OAuth2 redirect endpoint. When the new optional dashboard_host setting is empty, /api/v1/oauth2/{provider} (cmd/dashboard/controller/oauth2.go) reflects the attacker-supplied HTTP Host header into the redirect_uri sent to the identity provider instead of falling back to the configured install_host. An attacker who induces a victim to begin OAuth2 login via a request that reaches Nezha with a forged Host header can cause an attacker-controlled callback URL to be used as the redirect_uri; if the OAuth2 provider accepts it, the victim's authorization code is delivered to the attacker origin, allowing the attacker to complete the OAuth2 login/binding flow and take over the account. This regresses the fix for GHSA-9rc6-8cjv-rcvx and is configuration-dependent (dashboard_host empty). At the time of the advisory no patched version was available.","status":"published","published":"2026-09-27T21:31:04Z","modified":"2026-09-27T21:31:10Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T15:12:31.359269Z"},{"id":"GHSA-rf68-8gjr-36q7","title":"Nezha: OAuth2 redirect_uri Host header injection regression when dashboard_host is empty","description":"## Summary\n\nNezha v2.2.3 regresses the GHSA-9rc6-8cjv-rcvx host header injection fix for deployments where the new `dashboard_host` setting is empty. In that configuration, `/api/v1/oauth2/{provider}` again reflects the request `Host` header into the OAuth2 `redirect_uri` sent to the identity provider, even if `install_host` is configured.\n\n## Impact\n\nAn attacker who can get a victim to start OAuth2 login through a request that reaches Nezha with a forged `Host` header can make Nezha send an attacker-controlled callback URL as the OAuth2 `redirect_uri`. If the configured OAuth2 provider accepts that redirect URI, the victim's authorization code is sent to the attacker origin. The attacker can then complete the OAuth2 binding or login flow described in GHSA-9rc6.\n\nThis is configuration-dependent, but it affects a realistic upgrade/default state because `dashboard_host` is a new optional field. The original v2.2.0 fix fell back to `install_host`; current v2.2.3 only falls back when `dashboard_host` is non-empty.\n\n## Reproduction\n\nOn current v2.2.3 / master commit `3d74cd9431a48fa89c6489689eac82a872799ea0`, configure OAuth2 and set an existing dashboard host only through `install_host`, leaving `dashboard_host` empty. Then send the OAuth2 redirect request with a forged Host header:\n\n```http\nGET /api/v1/oauth2/github?type=1 HTTP/1.1\nHost: evil.attacker.test\nX-Forwarded-Proto: https\n```\n\nThe generated OAuth2 authorization URL contains:\n\n```text\nredirect_uri=https%3A%2F%2Fevil.attacker.test%2Fapi%2Fv1%2Foauth2%2Fcallback\n```\n\nA minimal route-level unit test demonstrating the issue is:\n\n```go\nfunc TestOAuth2Redirect_RegressionWhenDashboardHostEmptyReflectsForgedHost(t *testing.T) {\n    defer setupOAuth2Test(t)()\n    singleton.Conf.InstallHost = \"legit-dashboard.example.com\"\n    singleton.Conf.DashboardHost = \"\"\n    singleton.Conf.Oauth2[\"github\"] = \u0026model.Oauth2Config{\n        ClientID: \"client-id\",\n        ClientSecret: \"client-secret\",\n        Endpoint: model.Oauth2Endpoint{AuthURL: \"https://idp.example.test/authorize\", TokenURL: \"https://idp.example.test/token\"},\n        Scopes: []string{\"openid\"},\n    }\n\n    c, _ := newOAuth2Ctx(t)\n    c.Params = gin.Params{{Key: \"provider\", Value: \"github\"}}\n    c.Request.Host = \"evil.attacker.test\"\n    c.Request.URL.RawQuery = \"type=1\"\n    c.Request.Header.Set(\"X-Forwarded-Proto\", \"https\")\n\n    resp, err := oauth2redirect(c)\n    require.NoError(t, err)\n\n    parsed, err := url.Parse(resp.Redirect)\n    require.NoError(t, err)\n    require.Equal(t, \"https://evil.attacker.test/api/v1/oauth2/callback\", parsed.Query().Get(\"redirect_uri\"))\n}\n```\n\nThe corresponding control with `DashboardHost = \"panel.example.com\"` pins the same forged request to `https://panel.example.com/api/v1/oauth2/callback`, so the issue is specifically the empty `dashboard_host` fallback.\n\n## Root cause\n\nCurrent `cmd/dashboard/controller/oauth2.go` chooses the request Host unless `DashboardHost` is non-empty:\n\n```go\nhost := c.Request.Host\nif !singleton.IsReservedDashboardHost(host) \u0026\u0026 singleton.Conf != nil \u0026\u0026 singleton.Conf.DashboardHost != \"\" {\n    host = singleton.Conf.DashboardHost\n}\nreturn scheme + host + \"/api/v1/oauth2/callback\"\n```\n\nThe v2.2.0 fix used `InstallHost` as the fallback for untrusted request hosts. After `DashboardHost` was introduced, empty `dashboard_host` now disables host pinning and reintroduces the original Host header injection behavior for those deployments.\n\n## Remediation\n\nBuild the OAuth2 callback URL from a deterministic configured origin. For example:\n\n1. Use `DashboardHost` when it is set.\n2. Otherwise fall back to `InstallHost` if it is set, preserving the v2.2.0 invariant for existing deployments.\n3. If neither value is set, reject OAuth2 redirect initiation with a configuration error instead of reflecting request Host.\n\nPlease also add a regression test that `InstallHost` plus empty `DashboardHost` does not reflect a forged Host into `redirect_uri`.","status":"published","published":"2026-09-15T19:50:08Z","modified":"2026-09-15T19:50:09Z","cvss":[{"version":"4.0","score":2.9,"vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P","level":"low"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:41:17.136201Z"}],"nvd":[{"id":"CVE-2026-101090","description":"Nezha 2.2.3 contains a Host header injection regression in the OAuth2 redirect endpoint. When the new optional dashboard_host setting is empty, /api/v1/oauth2/{provider} (cmd/dashboard/controller/oauth2.go) reflects the attacker-supplied HTTP Host header into the redirect_uri sent to the identity provider instead of falling back to the configured install_host. An attacker who induces a victim to begin OAuth2 login via a request that reaches Nezha with a forged Host header can cause an attacker-controlled callback URL to be used as the redirect_uri; if the OAuth2 provider accepts it, the victim's authorization code is delivered to the attacker origin, allowing the attacker to complete the OAuth2 login/binding flow and take over the account. This regresses the fix for GHSA-9rc6-8cjv-rcvx and is configuration-dependent (dashboard_host empty). At the time of the advisory no patched version was available.","status":"published","published":"2026-09-27T21:17:03.003Z","modified":"2026-09-28T21:02:16.15Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"critical","assessor":"secondary"},{"version":"3.1","score":9.8,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","level":"critical","assessor":"secondary"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T14:12:52.081323Z"}],"osv":[{"id":"CVE-2026-101090","title":"Nezha through 2.2.3 Host Header Injection via OAuth2 redirect_uri","description":"Nezha 2.2.3 contains a Host header injection regression in the OAuth2 redirect endpoint. When the new optional dashboard_host setting is empty, /api/v1/oauth2/{provider} (cmd/dashboard/controller/oauth2.go) reflects the attacker-supplied HTTP Host header into the redirect_uri sent to the identity provider instead of falling back to the configured install_host. An attacker who induces a victim to begin OAuth2 login via a request that reaches Nezha with a forged Host header can cause an attacker-controlled callback URL to be used as the redirect_uri; if the OAuth2 provider accepts it, the victim's authorization code is delivered to the attacker origin, allowing the attacker to complete the OAuth2 login/binding flow and take over the account. This regresses the fix for GHSA-9rc6-8cjv-rcvx and is configuration-dependent (dashboard_host empty). At the time of the advisory no patched version was available.","status":"published","published":"2026-09-27T20:50:00.857Z","modified":"2026-10-28T02:30:32.319081485Z","cvss":[{"version":"4.0","score":9.3,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","level":"critical"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T15:44:53.83521Z"},{"id":"GHSA-rf68-8gjr-36q7","title":"Nezha: OAuth2 redirect_uri Host header injection regression when dashboard_host is empty","description":"## Summary\n\nNezha v2.2.3 regresses the GHSA-9rc6-8cjv-rcvx host header injection fix for deployments where the new `dashboard_host` setting is empty. In that configuration, `/api/v1/oauth2/{provider}` again reflects the request `Host` header into the OAuth2 `redirect_uri` sent to the identity provider, even if `install_host` is configured.\n\n## Impact\n\nAn attacker who can get a victim to start OAuth2 login through a request that reaches Nezha with a forged `Host` header can make Nezha send an attacker-controlled callback URL as the OAuth2 `redirect_uri`. If the configured OAuth2 provider accepts that redirect URI, the victim's authorization code is sent to the attacker origin. The attacker can then complete the OAuth2 binding or login flow described in GHSA-9rc6.\n\nThis is configuration-dependent, but it affects a realistic upgrade/default state because `dashboard_host` is a new optional field. The original v2.2.0 fix fell back to `install_host`; current v2.2.3 only falls back when `dashboard_host` is non-empty.\n\n## Reproduction\n\nOn current v2.2.3 / master commit `3d74cd9431a48fa89c6489689eac82a872799ea0`, configure OAuth2 and set an existing dashboard host only through `install_host`, leaving `dashboard_host` empty. Then send the OAuth2 redirect request with a forged Host header:\n\n```http\nGET /api/v1/oauth2/github?type=1 HTTP/1.1\nHost: evil.attacker.test\nX-Forwarded-Proto: https\n```\n\nThe generated OAuth2 authorization URL contains:\n\n```text\nredirect_uri=https%3A%2F%2Fevil.attacker.test%2Fapi%2Fv1%2Foauth2%2Fcallback\n```\n\nA minimal route-level unit test demonstrating the issue is:\n\n```go\nfunc TestOAuth2Redirect_RegressionWhenDashboardHostEmptyReflectsForgedHost(t *testing.T) {\n    defer setupOAuth2Test(t)()\n    singleton.Conf.InstallHost = \"legit-dashboard.example.com\"\n    singleton.Conf.DashboardHost = \"\"\n    singleton.Conf.Oauth2[\"github\"] = \u0026model.Oauth2Config{\n        ClientID: \"client-id\",\n        ClientSecret: \"client-secret\",\n        Endpoint: model.Oauth2Endpoint{AuthURL: \"https://idp.example.test/authorize\", TokenURL: \"https://idp.example.test/token\"},\n        Scopes: []string{\"openid\"},\n    }\n\n    c, _ := newOAuth2Ctx(t)\n    c.Params = gin.Params{{Key: \"provider\", Value: \"github\"}}\n    c.Request.Host = \"evil.attacker.test\"\n    c.Request.URL.RawQuery = \"type=1\"\n    c.Request.Header.Set(\"X-Forwarded-Proto\", \"https\")\n\n    resp, err := oauth2redirect(c)\n    require.NoError(t, err)\n\n    parsed, err := url.Parse(resp.Redirect)\n    require.NoError(t, err)\n    require.Equal(t, \"https://evil.attacker.test/api/v1/oauth2/callback\", parsed.Query().Get(\"redirect_uri\"))\n}\n```\n\nThe corresponding control with `DashboardHost = \"panel.example.com\"` pins the same forged request to `https://panel.example.com/api/v1/oauth2/callback`, so the issue is specifically the empty `dashboard_host` fallback.\n\n## Root cause\n\nCurrent `cmd/dashboard/controller/oauth2.go` chooses the request Host unless `DashboardHost` is non-empty:\n\n```go\nhost := c.Request.Host\nif !singleton.IsReservedDashboardHost(host) \u0026\u0026 singleton.Conf != nil \u0026\u0026 singleton.Conf.DashboardHost != \"\" {\n    host = singleton.Conf.DashboardHost\n}\nreturn scheme + host + \"/api/v1/oauth2/callback\"\n```\n\nThe v2.2.0 fix used `InstallHost` as the fallback for untrusted request hosts. After `DashboardHost` was introduced, empty `dashboard_host` now disables host pinning and reintroduces the original Host header injection behavior for those deployments.\n\n## Remediation\n\nBuild the OAuth2 callback URL from a deterministic configured origin. For example:\n\n1. Use `DashboardHost` when it is set.\n2. Otherwise fall back to `InstallHost` if it is set, preserving the v2.2.0 invariant for existing deployments.\n3. If neither value is set, reject OAuth2 redirect initiation with a configuration error instead of reflecting request Host.\n\nPlease also add a regression test that `InstallHost` plus empty `DashboardHost` does not reflect a forged Host into `redirect_uri`.","status":"published","published":"2026-09-15T19:50:08Z","modified":"2026-09-28T17:11:14.221598075Z","cvss":[{"version":"4.0","score":2.9,"vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:P","level":"low"}],"cwes":["CWE-601"],"updated_at":"2026-11-02T15:46:55.877614Z"},{"id":"GO-2026-6486","title":"Nezha: OAuth2 redirect_uri Host header injection regression when dashboard_host is empty in github.com/nezhahq/nezha","description":"Nezha: OAuth2 redirect_uri Host header injection regression when dashboard_host is empty in github.com/nezhahq/nezha","status":"published","published":"2026-09-28T16:43:40Z","modified":"2026-09-28T17:11:14.221598075Z","updated_at":"2026-11-02T15:47:03.11707Z"}]}}
