Skip to content

GHSA-wq4w-vwvq-q3x9 CVE-2026-84321 GO-2026-6801

Nginx UI: Standalone short tokens survive administrative revocation in cache and authenticate again after account re-enable

Medium Go
Severity
5.4 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
0.21%
Chance of exploitation in the next 30 days. Higher than 11.18% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-613 Insufficient Session Expiration
Fix
1.9.10-0.20260703131214-23d1934099b0
Upgrade github.com/0xJacky/Nginx-UI to this version or later

Description

Summary

Standalone short tokens issued for WebSocket and explicit-token authentication can survive administrative revocation in cache. If the same account is later re-enabled before the cache entry expires, the deleted short token becomes valid again.

Details

GenerateShortToken() creates an AuthToken row that contains only ShortToken and no long Token. DeleteUserTokens() removes database rows, but when clearing caches it only invalidates entries where authToken.Token != "". This leaves standalone short-token cache entries behind. GetTokenUserByShortToken() checks that cache first and then loads the user by ID, so the stale short token becomes usable again if the account status is restored to true.

Relevant code paths:

  • internal/user/user.go
  • internal/user/user.go
  • internal/user/user.go
  • api/user/short_token.go
  • internal/middleware/middleware.go

PoC

This was verfied locally in an isolated environment with a temporary package-level harness that exercised the real token issuance, revocation, cache, and re-authentication paths.

What the executed test did:

  1. Created an enabled user in a temporary SQLite database.
  2. Called the real GenerateShortToken(user.ID) function to issue a standalone short token.
  3. Verified that the token authenticated successfully and was present in the short-token cache.
  4. Disabled the user and called the real DeleteUserTokens(user.ID) function.
  5. Verified that the database token rows were removed.
  6. Verified that the short-token cache entry still existed after DeleteUserTokens.
  7. Re-enabled the same user.
  8. Reused the previously deleted short token via the real GetTokenUserByShortToken() path and observed successful authentication.

Observed result from the actual local verification:

  • The database token rows were removed during revocation.
  • The short-token cache entry remained present.
  • Re-enabling the user restored successful authentication through the stale short token.

Impact

Any deployment using standalone short tokens is affected. If a short token is stolen, administrative disable/delete-token handling may not fully revoke it. Re-enabling the account within the cache lifetime restores access for the stale token to any HTTP or WebSocket routes that accept short-token authentication.

Affected versions

Go

PackageVulnerableFixed in
github.com/0xJacky/Nginx-UI
< 1.9.10-0.20260703131214-23d1934099b0
1.9.10-0.20260703131214-23d1934099b0

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

github.com/0xJacky/Nginx-UI Go → 1.9.10-0.20260703131214-23d1934099b0

go
go get github.com/0xJacky/Nginx-UI@v1.9.10-0.20260703131214-23d1934099b0 && go mod tidy

Severity breakdown

CVSS 3.1 5.4

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
Low
Availability
None

Weakness

CWE-613: Insufficient Session Expiration

According to WASC, "Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization."

How to prevent it
  • Implementation: Set sessions/credentials expiration date.

References

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GO-2026-6773
Nginx UI: Casdoor SSO callback uses a constant `state` parameter (login CSRF)
High Also affects github.com/0xJacky/Nginx-UI
GHSA-vc32-4gwf-77xp
Nginx UI: OTP secure-session step-up can be bypassed via MCP configuration tools
High Also affects github.com/0xJacky/Nginx-UI
GHSA-jrq7-xrjx-pcfw
Nginx UI: Auto backup name allows path traversal outside validated storage path
Medium Also affects github.com/0xJacky/Nginx-UI
GHSA-5r62-gj48-897x
Nginx UI: MCP configuration tools bypass restricted directive validation and allow secondary authenticated users to execute NJS in Nginx worker context
High Also affects github.com/0xJacky/Nginx-UI
GHSA-9jww-cxg5-rj9m
Nginx UI: MCP `nginx_config_add` Bypasses Directive Validation — Authenticated RCE
High Also affects github.com/0xJacky/Nginx-UI
GHSA-76pm-mq2q-9gcr
Nginx UI: MCP nginx_config_add skips config directive validation → authenticated nginx directive injection (RCE on the official image)
High Also affects github.com/0xJacky/Nginx-UI
GHSA-cf23-7qxj-xmhr
Nginx UI: nginx config directive denylist (ValidateConfigFile) is bypassable via same-line ";" separation → authenticated directive injection (RCE on the official image)
High Also affects github.com/0xJacky/Nginx-UI
GHSA-5v7c-xpfp-p65m
Nginx UI OTP secure-session step-up is missing on sensitive mutation routes
High Also affects github.com/0xJacky/Nginx-UI
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor