Loading0%
SUBZER0
LIVE
Alerts

CVE-2026-84312

Nginx UI: Casdoor SSO callback uses a constant `state` parameter (login CSRF)

Archived. This CVE has left SubZer0's live 30-day window. Signals below are as of 2026-11-14; check the references for anything newer.

  • Severity: High
  • CVSS 7.1
  • EPSS 0.17%
  • Public exploit
  • P2 · This week

Why P2: this week.

Description

## Summary In the Casdoor SSO flow, the OAuth `state` parameter is hard-coded to `settings.CasdoorSettings.Application` — a value identical for every user and every login. The callback handler accepts whatever `state` the client sends without comparing it to anything stored in the user agent, enabling a login-CSRF: an attacker can force the victim's browser to authenticate as the *attacker*. ## Details `api/user/casdoor.go:92-117` (`GetCasdoorUri`): ```go func GetCasdoorUri(c *gin.Context) { clientId := settings.CasdoorSettings.ClientId redirectUri := settings.CasdoorSettings.RedirectUri state := settings.CasdoorSettings.Application // ← constant ... c.JSON(http.StatusOK, gin.H{ "uri": fmt.Sprintf( "%s/login/oauth/authorize?client_id=%s&response_type=code&redirect_uri=%s&state=%s&scope=read", endpoint, clientId, encodedRedirectUri, state), }) } ``` `api/user/casdoor.go:24-90` (`CasdoorCallback`): ```go type CasdoorLoginUser struct { Code string `json:"code" binding:"required,max=255"` State string `json:"state" binding:"required,max=255"` } func CasdoorCallback(c *gin.Context) { var loginUser CasdoorLoginUser if !cosy.BindAndValid(c, &loginUser) { return } ... // state is NEVER compared to a per-session value token, err := casdoorsdk.GetOAuthToken(loginUser.Code, loginUser.State) ... u, err := user.GetUser(claims.Name) // username from Casdoor's JWT ... use…

Affected products

  • go github.com/0xJacky/Nginx-UI < 1.9.10-0.20260703131214-23d1934099b0; first patched: 1.9.10-0.20260703131214-23d1934099b0

References

Browse more

Go modulesnginxWeek 42, 2026 recap

Published 2026-10-12 · sources: GitHub Advisory Database