CVE-2026-101090
Nezha through 2.2.3 Host Header Injection via OAuth2 redirect_uri
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.3
Nezha through 2.2.3 Host Header Injection via OAuth2 redirect_uri
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.
- Record
CVE-2026-101090- CVSS 4.0
- 9.3 Critical
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 - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-601
- Updated
- 2026-11-02
EUVDEUVD-2026-88025
9.3
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.
- Record
EUVD-2026-88025- CVSS 4.0
- 9.3 Critical
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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-62gj-x2f3-j2wj
9.3
Nezha 2.2.3 contains a Host header injection regression in the OAuth2 redirect endpoint. When the...
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.
- Record
GHSA-62gj-x2f3-j2wj- CVSS 4.0
- 9.3 Critical
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 - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-601
- Updated
- 2026-11-02
GitHub AdvisoriesGHSA-rf68-8gjr-36q7
2.9
Nezha: OAuth2 redirect_uri Host header injection regression when dashboard_host is empty
Summary
Nezha 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.
Impact
An 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.
This 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.
Reproduction
On 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:
GET /api/v1/oauth2/github?type=1 HTTP/1.1
Host: evil.attacker.test
X-Forwarded-Proto: https
The generated OAuth2 authorization URL contains:
redirect_uri=https%3A%2F%2Fevil.attacker.test%2Fapi%2Fv1%2Foauth2%2Fcallback
A minimal route-level unit test demonstrating the issue is:
func TestOAuth2Redirect_RegressionWhenDashboardHostEmptyReflectsForgedHost(t *testing.T) {
defer setupOAuth2Test(t)()
singleton.Conf.InstallHost = "legit-dashboard.example.com"
singleton.Conf.DashboardHost = ""
singleton.Conf.Oauth2["github"] = &model.Oauth2Config{
ClientID: "client-id",
ClientSecret: "client-secret",
Endpoint: model.Oauth2Endpoint{AuthURL: "https://idp.example.test/authorize", TokenURL: "https://idp.example.test/token"},
Scopes: []string{"openid"},
}
c, _ := newOAuth2Ctx(t)
c.Params = gin.Params{{Key: "provider", Value: "github"}}
c.Request.Host = "evil.attacker.test"
c.Request.URL.RawQuery = "type=1"
c.Request.Header.Set("X-Forwarded-Proto", "https")
resp, err := oauth2redirect(c)
require.NoError(t, err)
parsed, err := url.Parse(resp.Redirect)
require.NoError(t, err)
require.Equal(t, "https://evil.attacker.test/api/v1/oauth2/callback", parsed.Query().Get("redirect_uri"))
}
The 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.
Root cause
Current cmd/dashboard/controller/oauth2.go chooses the request Host unless DashboardHost is non-empty:
host := c.Request.Host
if !singleton.IsReservedDashboardHost(host) && singleton.Conf != nil && singleton.Conf.DashboardHost != "" {
host = singleton.Conf.DashboardHost
}
return scheme + host + "/api/v1/oauth2/callback"
The 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.
Remediation
Build the OAuth2 callback URL from a deterministic configured origin. For example:
- Use
DashboardHostwhen it is set. - Otherwise fall back to
InstallHostif it is set, preserving the v2.2.0 invariant for existing deployments. - If neither value is set, reject OAuth2 redirect initiation with a configuration error instead of reflecting request Host.
Please also add a regression test that InstallHost plus empty DashboardHost does not reflect a forged Host into redirect_uri.
- Record
GHSA-rf68-8gjr-36q7- CVSS 4.0
- 2.9 Low
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 - Weakness
- CWE-601
- Updated
- 2026-11-02
NVD
9.3
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.
- Record
CVE-2026-101090- CVSS 4.0
- 9.3 Critical
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 - CVSS 3.1
- 9.8 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-601
- Updated
- 2026-11-02
OSV
9.3
Nezha through 2.2.3 Host Header Injection via OAuth2 redirect_uri
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.
- Record
CVE-2026-101090- CVSS 4.0
- 9.3 Critical
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 - Weakness
- CWE-601
- Updated
- 2026-11-02
OSVGHSA-rf68-8gjr-36q7
2.9
Nezha: OAuth2 redirect_uri Host header injection regression when dashboard_host is empty
Summary
Nezha 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.
Impact
An 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.
This 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.
Reproduction
On 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:
GET /api/v1/oauth2/github?type=1 HTTP/1.1
Host: evil.attacker.test
X-Forwarded-Proto: https
The generated OAuth2 authorization URL contains:
redirect_uri=https%3A%2F%2Fevil.attacker.test%2Fapi%2Fv1%2Foauth2%2Fcallback
A minimal route-level unit test demonstrating the issue is:
func TestOAuth2Redirect_RegressionWhenDashboardHostEmptyReflectsForgedHost(t *testing.T) {
defer setupOAuth2Test(t)()
singleton.Conf.InstallHost = "legit-dashboard.example.com"
singleton.Conf.DashboardHost = ""
singleton.Conf.Oauth2["github"] = &model.Oauth2Config{
ClientID: "client-id",
ClientSecret: "client-secret",
Endpoint: model.Oauth2Endpoint{AuthURL: "https://idp.example.test/authorize", TokenURL: "https://idp.example.test/token"},
Scopes: []string{"openid"},
}
c, _ := newOAuth2Ctx(t)
c.Params = gin.Params{{Key: "provider", Value: "github"}}
c.Request.Host = "evil.attacker.test"
c.Request.URL.RawQuery = "type=1"
c.Request.Header.Set("X-Forwarded-Proto", "https")
resp, err := oauth2redirect(c)
require.NoError(t, err)
parsed, err := url.Parse(resp.Redirect)
require.NoError(t, err)
require.Equal(t, "https://evil.attacker.test/api/v1/oauth2/callback", parsed.Query().Get("redirect_uri"))
}
The 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.
Root cause
Current cmd/dashboard/controller/oauth2.go chooses the request Host unless DashboardHost is non-empty:
host := c.Request.Host
if !singleton.IsReservedDashboardHost(host) && singleton.Conf != nil && singleton.Conf.DashboardHost != "" {
host = singleton.Conf.DashboardHost
}
return scheme + host + "/api/v1/oauth2/callback"
The 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.
Remediation
Build the OAuth2 callback URL from a deterministic configured origin. For example:
- Use
DashboardHostwhen it is set. - Otherwise fall back to
InstallHostif it is set, preserving the v2.2.0 invariant for existing deployments. - If neither value is set, reject OAuth2 redirect initiation with a configuration error instead of reflecting request Host.
Please also add a regression test that InstallHost plus empty DashboardHost does not reflect a forged Host into redirect_uri.
- Record
GHSA-rf68-8gjr-36q7- CVSS 4.0
- 2.9 Low
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 - Weakness
- CWE-601
- Updated
- 2026-11-02
OSVGO-2026-6486 No score
Nezha: OAuth2 redirect_uri Host header injection regression when dashboard_host is empty in github.com/nezhahq/nezha
Nezha: OAuth2 redirect_uri Host header injection regression when dashboard_host is empty in github.com/nezhahq/nezha
- Record
GO-2026-6486- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/nezhahq/nezhaGo |
2.2.3 to 2.2.3 | None known |
github.com/nezhahq/nezhaGo |
Listed versions 2.2.3 |
None known |
github.com/nezhahq/nezhaGo |
All versions | None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-101090 is a critical vulnerability (CVSS 9.3) in Nezhahq Nezha, published September 15, 2026. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.44%, the 38th percentile. No source names a fixed version.
References
github.com/nezhahq/nezha/security/advisories/GHSA-rf68-8gjr-36q7
vulncheck.com/advisories/nezha-through-2.2.3-host-header-injection-via-oauth2-redirect-uri
nvd.nist.gov/vuln/detail/CVE-2026-101090
github.com/advisories/GHSA-62gj-x2f3-j2wj
github.com/nezhahq/nezha/commit/38824dbc11a63964c5b9296ae4c68e62b34fa04b
github.com/advisories/GHSA-rf68-8gjr-36q7
github.com/CVEProject/cvelistV5/tree/main/cves/2026/101xxx/CVE-2026-101090.json
github.com/nezhahq/nezha