{"id":"GO-2026-6773","revision":null,"records":[{"revision":"2c941a0b44e343d998bd1ac19a4eea24","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2026-84312","aliases":[],"title":"Nginx UI: Casdoor SSO callback uses a constant `state` parameter (login CSRF)","description":"Nginx UI is a web user interface for the Nginx web server. Prior to 2.4.1, GetCasdoorUri uses the configured Casdoor application name as a constant OAuth state value and CasdoorCallback does not compare the submitted state with a value bound to the initiating browser session. An unauthenticated attacker can cause a victim's browser to complete an attacker-controlled Casdoor authorization flow, and the callback can mint a Nginx UI session for the identity returned by that authorization code. This issue is fixed in version 2.4.1.","state":0,"publishedAt":"2026-10-12T21:16:56.072+00:00","modifiedAt":"2026-10-14T11:36:49.978+00:00","affected":[{"ecosystem":"Vendor product","name":"nginx-ui","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"0xJacky\",\n                    \"product\": \"nginx-ui\",\n                    \"versions\": [\n                        {\n                            \"version\": \"< 2.4.1\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[{"system":"CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"severity":"HIGH"}],"references":["https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-44xr-mrhh-qm78","https://github.com/0xJacky/nginx-ui/commit/23d1934099b05b2a01589b48129dc3d3159d91c2","https://github.com/0xJacky/nginx-ui/releases/tag/v2.4.1"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2026-84312","license":"CVE Program Terms of Use","key":"cve-program:CVE-2026-84312","identifiers":["CVE-2026-84312"]},"retained":false,"historicalAffected":[]},{"revision":"923b8574bfdf4e9e903a3587ca0e11f6","observedAt":"2026-10-30T12:01:20.844+00:00","statement":{"source":"euvd","id":"EUVD-2026-97963","aliases":["CVE-2026-84312","GHSA-44xr-mrhh-qm78"],"title":"Nginx UI is a web user interface for the Nginx web server. Prior to 2.4.1, GetCasdoorUri uses the configured Casdoor application name as a constant OAuth state value and CasdoorCallback does not compare the submitted state with a value boun…","description":"Nginx UI is a web user interface for the Nginx web server. Prior to 2.4.1, GetCasdoorUri uses the configured Casdoor application name as a constant OAuth state value and CasdoorCallback does not compare the submitted state with a value bound to the initiating browser session. An unauthenticated attacker can cause a victim's browser to complete an attacker-controlled Casdoor authorization flow, and the callback can mint a Nginx UI session for the identity returned by that authorization code. This issue is fixed in version 2.4.1.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"severity":null}],"references":["https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-44xr-mrhh-qm78","https://github.com/0xJacky/nginx-ui/commit/23d1934099b05b2a01589b48129dc3d3159d91c2","https://github.com/0xJacky/nginx-ui/releases/tag/v2.4.1"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-97963","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Oct 12, 2026, 9:16:56 PM","dateUpdated":"Oct 14, 2026, 11:36:49 AM"},"relatedAdvisories":[],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2026-97963","identifiers":["EUVD-2026-97963","CVE-2026-84312","GHSA-44xr-mrhh-qm78"]},"retained":false,"historicalAffected":[]},{"revision":"0d071274f3154b0089a45c8434812acc","observedAt":"2026-10-25T16:19:16.24+00:00","statement":{"source":"nvd","id":"CVE-2026-84312","aliases":[],"title":"Nginx UI is a web user interface for the Nginx web server. Prior to 2.4.1, GetCasdoorUri uses the configured Casdoor application name as a constant OAuth state value and CasdoorCallback does not compare the submitted state with a value boun…","description":"Nginx UI is a web user interface for the Nginx web server. Prior to 2.4.1, GetCasdoorUri uses the configured Casdoor application name as a constant OAuth state value and CasdoorCallback does not compare the submitted state with a value bound to the initiating browser session. An unauthenticated attacker can cause a victim's browser to complete an attacker-controlled Casdoor authorization flow, and the callback can mint a Nginx UI session for the identity returned by that authorization code. This issue is fixed in version 2.4.1.","state":0,"publishedAt":"2026-10-12T22:17:05.263+00:00","modifiedAt":"2026-10-14T12:17:18.203+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · security-advisories@github.com · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":7.1,"severity":"HIGH"}],"references":["https://github.com/0xJacky/nginx-ui/commit/23d1934099b05b2a01589b48129dc3d3159d91c2","https://github.com/0xJacky/nginx-ui/releases/tag/v2.4.1","https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-44xr-mrhh-qm78"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2026-84312","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-287","CWE-352"],"productCriteria":[],"sourceDates":{"published":"2026-10-12T22:17:05.263","lastModified":"2026-10-14T12:17:18.203"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2026-84312","identifiers":["CVE-2026-84312"]},"retained":false,"historicalAffected":[]},{"revision":"7c5417c97ad44197a89cd5274813adc0","observedAt":"2026-10-28T15:48:49.17+00:00","statement":{"source":"osv","id":"GHSA-44xr-mrhh-qm78","aliases":["CVE-2026-84312","GO-2026-6773"],"title":"Nginx UI: Casdoor SSO callback uses a constant `state` parameter (login CSRF)","description":"## Summary\n\nIn 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*.\n\n## Details\n\n`api/user/casdoor.go:92-117` (`GetCasdoorUri`):\n\n```go\nfunc GetCasdoorUri(c *gin.Context) {\n    clientId := settings.CasdoorSettings.ClientId\n    redirectUri := settings.CasdoorSettings.RedirectUri\n    state := settings.CasdoorSettings.Application      // ← constant\n    ...\n    c.JSON(http.StatusOK, gin.H{\n        \"uri\": fmt.Sprintf(\n            \"%s/login/oauth/authorize?client_id=%s&response_type=code&redirect_uri=%s&state=%s&scope=read\",\n            endpoint, clientId, encodedRedirectUri, state),\n    })\n}\n```\n\n`api/user/casdoor.go:24-90` (`CasdoorCallback`):\n\n```go\ntype CasdoorLoginUser struct {\n    Code  string `json:\"code\" binding:\"required,max=255\"`\n    State string `json:\"state\" binding:\"required,max=255\"`\n}\n\nfunc CasdoorCallback(c *gin.Context) {\n    var loginUser CasdoorLoginUser\n    if !cosy.BindAndValid(c, &loginUser) { return }\n    ...\n    // state is NEVER compared to a per-session value\n    token, err := casdoorsdk.GetOAuthToken(loginUser.Code, loginUser.State)\n    ...\n    u, err := user.GetUser(claims.Name)        // username from Casdoor's JWT\n    ...\n    userToken, err := user.GenerateJWT(u)       // JWT minted for whatever user came back\n}\n```\n\nCompare 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.\n\n## Proof of Concept\n\n1. Attacker initiates a Casdoor authorisation flow on their own browser, obtaining an authorisation `code` for *their* Casdoor account.\n2. Attacker hosts a page that auto-submits the captured `code` to the victim's nginx-ui:\n\n   ```html\n   <html><body><form action=\"https://victim.example/api/casdoor_callback\" method=\"POST\"\n                     enctype=\"text/plain\" id=\"x\">\n     <input name='{\"code\":\"<attacker_code>\",\"state\":\"<App>\",\"junk\":\"' value='\"}'>\n   </form>\n   <script>document.getElementById('x').submit()</script>\n   </body></html>\n   ```\n\n3. Server exchanges the attacker's `code`, looks up the username from `claims.Name` in the local user table, and mints a JWT for *that* row. The callback also sets the `_nginx_ui_secure_session` cookie via `middleware.EnsureSecureSessionCookie(c)` (`casdoor.go:84`) — meaning the victim is now silently authenticated as the attacker.\n4. Victim, believing they are using their own account, configures sites / TLS keys; the attacker reads them.\n\n## Impact\n\nLogin CSRF — the victim is forced to authenticate as the attacker, leading to data exfiltration of anything the victim subsequently uploads or configures. Particularly dangerous when nginx-ui is used by an organisation where Casdoor maps internal identities — the attacker can attribute their changes to the victim.\n\n## Patches\n\nMirror the OIDC implementation:\n\n```diff\n+ import (\n+    \"crypto/rand\"\n+    \"crypto/subtle\"\n+    \"encoding/hex\"\n+    ...\n+ )\n\n func GetCasdoorUri(c *gin.Context) {\n     ...\n-    state := settings.CasdoorSettings.Application\n+    b := make([]byte, 16)\n+    if _, err := rand.Read(b); err != nil {\n+        cosy.ErrHandler(c, err); return\n+    }\n+    state := hex.EncodeToString(b)\n+    c.SetSameSite(http.SameSiteLaxMode)\n+    c.SetCookie(\"casdoor_state\", state, 600, \"/\", \"\",\n+                cSettings.ServerSettings.EnableHTTPS, true)\n     ...\n }\n\n func CasdoorCallback(c *gin.Context) {\n+    expected, err := c.Cookie(\"casdoor_state\")\n+    if err != nil {\n+        c.AbortWithStatusJSON(http.StatusBadRequest,\n+            gin.H{\"message\":\"missing state cookie\"}); return\n+    }\n     var loginUser CasdoorLoginUser\n     if !cosy.BindAndValid(c, &loginUser) { return }\n+    if subtle.ConstantTimeCompare([]byte(expected), []byte(loginUser.State)) != 1 {\n+        c.AbortWithStatusJSON(http.StatusBadRequest,\n+            gin.H{\"message\":\"invalid state\"}); return\n+    }\n     ...\n }\n```\n\n## Workarounds\n\nDisable Casdoor SSO until patched. The OIDC integration in `api/user/oidc.go` is correctly implemented and can be used as a substitute.\n\n## References\n\n* [`api/user/casdoor.go:92-117`](https://github.com/0xJacky/nginx-ui/blob/dev/api/user/casdoor.go#L92-L117)\n* [`api/user/casdoor.go:24-90`](https://github.com/0xJacky/nginx-ui/blob/dev/api/user/casdoor.go#L24-L90)\n* [`api/user/oidc.go:35-48`](https://github.com/0xJacky/nginx-ui/blob/dev/api/user/oidc.go#L35-L48) (correct implementation for comparison)\n\n## Credits\n\nVishal Shukla ([@shukla304](https://github.com/shukla304)) and Sechub.dev AI Agent.","state":0,"publishedAt":"2026-10-15T20:12:52+00:00","modifiedAt":"2026-10-28T15:15:05.4436717+00:00","affected":[{"ecosystem":"Go","name":"github.com/0xJacky/Nginx-UI","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"1.9.10-0.20260703131214-23d1934099b0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:L/A:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-44xr-mrhh-qm78","https://nvd.nist.gov/vuln/detail/CVE-2026-84312","https://github.com/0xJacky/nginx-ui/commit/23d1934099b05b2a01589b48129dc3d3159d91c2","https://github.com/0xJacky/nginx-ui","https://github.com/0xJacky/nginx-ui/releases/tag/v2.4.1"],"sourceUrl":"https://github.com/advisories/GHSA-44xr-mrhh-qm78","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-44xr-mrhh-qm78","identifiers":["GHSA-44xr-mrhh-qm78","CVE-2026-84312","GO-2026-6773"]},"retained":false,"historicalAffected":[]},{"revision":"89bdbfd389b54133a900b1c265b23ea5","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GO-2026-6773","aliases":["CVE-2026-84312","GHSA-44xr-mrhh-qm78"],"title":"Casdoor SSO callback uses a constant state parameter (login CSRF) in github.com/0xJacky/Nginx-UI","description":"Casdoor SSO callback uses a constant state parameter (login CSRF) in github.com/0xJacky/Nginx-UI","state":0,"publishedAt":"2026-10-19T21:08:39+00:00","modifiedAt":"2026-10-19T21:31:37.8068009+00:00","affected":[{"ecosystem":"Go","name":"github.com/0xJacky/Nginx-UI","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[],"references":["https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-44xr-mrhh-qm78","https://github.com/0xJacky/nginx-ui/commit/23d1934099b05b2a01589b48129dc3d3159d91c2","https://github.com/0xJacky/nginx-ui/releases/tag/v2.4.1"],"sourceUrl":"https://osv.dev/vulnerability/GO-2026-6773","license":"OSV · upstream source license applies","key":"osv:GO-2026-6773","identifiers":["GO-2026-6773","CVE-2026-84312","GHSA-44xr-mrhh-qm78"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-10-31T06:57:38.3088666+00:00","complete":true,"records":1766,"lastAttemptAt":"2026-10-31T06:57:38.3088666+00:00","lastSuccessAt":"2026-10-31T06:57:38.5290589+00:00","error":null,"lastVerifiedAt":"2026-10-31T06:57:38.5291813+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-9266d7b009bf9c4a0ccdcb5cbdea7f905cb3c4d92fd3b41581ece16b2cfdc4e7-7018a7a91bdbe7a328c3977e056f4a7eac81e7fe5f6abb4ce52489f9898b901e","complete":true,"records":417507,"lastAttemptAt":"2026-10-31T06:57:37.7731294+00:00","lastSuccessAt":"2026-10-31T06:45:34.914523+00:00","error":null,"lastVerifiedAt":"2026-10-31T06:57:37.7731294+00:00","snapshotPublishedAt":"2026-10-31T06:29:47+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-c5eb069e059248ab9c1b8cc754ce0885","complete":true,"records":13565,"lastAttemptAt":"2026-10-31T06:58:04.8764688+00:00","lastSuccessAt":"2026-10-31T03:47:38.206+00:00","error":null,"lastVerifiedAt":"2026-10-31T03:47:38.206+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13637,"expectedIdentifiers":13637,"failedIdentifiers":0},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-10-31T06:57:38.3088666+00:00","complete":true,"records":1094,"lastAttemptAt":"2026-10-31T06:57:38.3088666+00:00","lastSuccessAt":"2026-10-31T06:57:38.6628702+00:00","error":null,"lastVerifiedAt":"2026-10-31T06:57:38.662871+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-4598b57cf00a4cd7b27f4e709d9a3cdd","complete":false,"records":13577,"lastAttemptAt":"2026-10-31T06:58:04.1602726+00:00","lastSuccessAt":"2026-10-31T06:58:04.156+00:00","error":null,"lastVerifiedAt":"2026-10-31T06:58:04.156+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13547,"expectedIdentifiers":13637,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-21dcd6662970dfea02e4ea60ee637115e8d92664947484d2b9276b3f6568a84f","complete":true,"records":9815,"lastAttemptAt":"2026-10-31T06:57:38.1988123+00:00","lastSuccessAt":"2026-10-30T23:47:34.1817587+00:00","error":null,"lastVerifiedAt":"2026-10-31T06:57:38.1988123+00:00","snapshotPublishedAt":"2026-10-30T23:33:17+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-2de9ccc5290f060c7aa63f89c25dd76f655a64ba1aba7c05c97fa3bee4f09899","complete":true,"records":1967,"lastAttemptAt":"2026-10-31T06:57:37.9918567+00:00","lastSuccessAt":"2026-10-28T20:55:34.2982937+00:00","error":null,"lastVerifiedAt":"2026-10-31T06:57:37.9918567+00:00","snapshotPublishedAt":"2026-10-28T20:03:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-f95f76cd406ae5bae3de632ad37fd2d5160b44f5e6b51748ac6f8f0c0c88e72b","complete":true,"records":3028,"lastAttemptAt":"2026-10-31T06:57:38.2123603+00:00","lastSuccessAt":"2026-10-30T23:47:38.4914494+00:00","error":null,"lastVerifiedAt":"2026-10-31T06:57:38.2123603+00:00","snapshotPublishedAt":"2026-10-30T23:18:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-3ce2e3336768d0abd5b020f6f12bd5502a5deb02700e9d89d279597dce6e72ae","complete":true,"records":230992,"lastAttemptAt":"2026-10-31T06:57:38.0990122+00:00","lastSuccessAt":"2026-10-31T03:47:08.0119269+00:00","error":null,"lastVerifiedAt":"2026-10-31T06:57:38.0990122+00:00","snapshotPublishedAt":"2026-10-31T03:03:11+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}