highCVSS 7.1Vulnerability

CVE-2026-84312

## 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 ... userToken, err := user.GenerateJWT(u) // JWT minted for whatever user came back } ``` Compare with the OIDC implementation in `api/user/oidc.go:35-48`, which generates a random state, stores it in an `oidc_state` cookie, and validates it on the callback. Casdoor has no such check. ## Proof of Concept 1. Attacker initiates a Casdoor authorisation flow on their own browser, obtaining an authorisation `code` for *their* Casdoor account. 2. Attacker hosts a page that auto-submits the captured `

Properties

severity
high
summary
Nginx UI: Casdoor SSO callback uses a constant `state` parameter (login CSRF)
cvss_score
7.1
retrieved_at
2026-10-15T22:56:51+00:00
ghsa_published
2026-10-15T20:12:52Z
source_url
https://github.com/advisories/GHSA-44xr-mrhh-qm78
ghsa_updated
2026-10-15T20:12:53Z
ghsa_id
GHSA-44xr-mrhh-qm78
last_source
GitHub Advisory Database
cve_id
CVE-2026-84312
cvss_vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N
signal_observed_at
2026-10-15T22:56:51+00:00
is_ghsa_only
false

Related Entities (5)

VULNERABLE_TO (1)

←[Software]go/Nginx-UI

AFFECTS (1)

→[Software]go/Nginx-UI

HAS_WEAKNESS (2)

→[Weakness]Cross-Site Request Forgery (CSRF)
→[Weakness]Improper Authentication

REPORTED_BY (1)

→[Source]GitHub Advisory Database

Explore deeper with Ninja Signal's threat intelligence graph

CVE-2026-84312 (CVSS 7.1) — Ninja Signal Threat Intelligence | Ninja Signal