0xJacky/nginx-ui /api/nodes Leaks Cluster Node Tokens and Allows Cross-Node Impersonation as initUser
CVE-2026-107811 · GHSA-32gc-wf3m-78w9 · GO-2026-6702 · published 9 Oct 2026
How serious is it
- Severity: high, CVSS score 8.8 out of 10.
- No exploit prediction (EPSS) score yet.
- Not on the CISA list of exploited vulnerabilities.
- No public exploit in Exploit-DB.
Is your app affected by CVE-2026-107811?
Paste this prompt into Claude Code, Cursor or any AI coding tool: it runs a free Shippable scan of your project and fixes what it finds. Built with Lovable, Bolt or v0? Scan your live app. Or upload your package file.
Who is affected
github.com/0xJacky/Nginx-UI(Go) >= 1.9.10-0.20250517140552-daee3ac7ade1, < 1.9.10-0.20260728091109-0ecbd106c37b
How to check
- Run
go list -m github.com/0xJacky/Nginx-UIin your project to see the installed version, including copies pulled in by other packages. - Or paste your lockfile into the checker: it lists every package with a known vulnerability, this one included.
How to fix
Copies a prompt for Claude Code, Cursor or Codex: it checks your lockfiles for this and upgrades it.
- Upgrade
github.com/0xJacky/Nginx-UIto 1.9.10-0.20260728091109-0ecbd106c37b or later, commit the lockfile and redeploy. - If a vulnerable version was live, check your logs and rotate the secrets that server could read.
The advisory
Summary
0xJacky/nginx-ui contains a high-severity trust-boundary failure between ordinary users and cluster node credentials. The source code shows that cluster node list and detail endpoints are reachable by ordinary authenticated users and return node objects containing the token field.
That same token is also used as the X-Node-Secret shared credential for node-to-node authentication. When the middleware receives a correct node secret, it upgrades the request to initUser and bypasses the normal user-authentication path. As a result, any low-privileged authenticated user can first read a node token from /api/nodes and then impersonate a trusted node against a remote node's management API, achieving cross-node administrative authentication bypass.
Details
The root cause is a combination of sensitive credential exposure and improper trust elevation for node-to-node authentication. First, router/routers.go:87-105 mounts cluster.InitRouter(g) inside the shared /api authenticated route group, so any successfully authenticated user can access node list and detail endpoints.
Next, api/cluster/node.go:19-48 implements GetNode and GetNodeList by directly returning analytic.GetNode(node). Meanwhile, model/node.go:8-13 defines Token with the JSON tag json:"token", meaning the node secret is serialized into API responses. The surrounding code path does not redact that field. Therefore, a low-privileged user can call /api/nodes or /api/nodes/:id and retrieve both the target node URL and the token value used for trusted node authentication.
The second half of the exploit chain is in internal/middleware/middleware.go:73-103. The middleware reads a node secret from the X-Node-Secret header or node_secret query parameter. If that supplied value matches settings.NodeSettings.Secret, the request is immediately associated with user.GetInitUser(c), stored in the context as user, and allowed to continue. In other words, possession of the node secret is treated as sufficient to become initUser and bypass the normal JWT-based user-authentication flow.
This makes the disclosed token directly reusable for privilege escalation. A low-privileged user logs in to the primary instance, retrieves the cluster node token through /api/nodes, then sends a request to the remote node with X-Node-Secret set to the leaked token. Because the remote node upgrades the request to initUser, the attacker can invoke sensitive management handlers. The verified evidence identifies api/system/router.go and api/system/restart.go as examples of reachable high-risk operations, including POST /api/system/restart.
Core vulnerable code path:
go
// router/routers.go:87-105
g := root.Group("/", middleware.AuthRequired(), middleware.Proxy())
{
debug.InitRouter(g)
user.InitUserRouter(g)
analytic.InitRouter(g)
user.InitManageUserRouter(g)
nginx.InitRouter(g)
sites.InitRouter(g)
streams.InitRouter(g)
config.InitRouter(g)
template.InitRouter(g)
certificate.InitCertificateRouter(g)
certificate.InitDNSCredentialRouter(g)
certificate.InitAcmeUserRouter(g)
dnsapi.InitRouter(g)
system.InitPrivateRouter(g)
settings.InitRouter(g)
llm.InitRouter(g)
cluster.InitRouter(g)
notification.InitRouter(g)
external_notify.InitRouter(g)
backup.InitAutoBackupRouter(g)
nginxLog.InitRouter(g)
upstream.InitHTTPRouter(g)
g.GET("/geolite/status", geolite.GetStatus)
}
This route block shows that cluster endpoints are mounted in the shared authenticated route group. Any user with a valid JWT can reach cluster management APIs; there is no administrator-only authorization gate here.
go
// api/cluster/node.go:19-48
func GetNode(c *gin.Context) {
id := cast.ToUint64(c.Param("id"))
nodeQuery := query.Node
node, err := nodeQuery.FirstByID(id)
if err != nil {
cosy.ErrHandler(c, err)
return
}
c.JSON(http.StatusOK, analytic.GetNode(node))
}
func GetNodeList(c *gin.Context) {
core := cosy.Core[model.Node](c).
SetFussy("name")
// fix for sqlite
if c.Query("enabled") != "" {
core.GormScope(func(tx *gorm.DB) *gorm.DB {
return tx.Where("enabled = ?", cast.ToInt(cast.ToBool(c.Query("enabled"))))
})
}
core.SetTransformer(func(m *model.Node) any {
return analytic.GetNode(m)
})
core.List()
}
These handlers return node information directly to authenticated users. Because the returned object ultimately embeds the raw model.Node and that model contains a JSON token field, the API leaks the remote node shared secret.
go
// model/node.go:8-13
type Node struct {
Model
Name string `json:"name"`
URL string `json:"url"`
Token string `json:"token"`
Enabled bool `json:"enabled" gorm:"default:false"`
}
The model definition confirms that Token is JSON-serializable. This is a core part of the sensitive-information exposure because the field is not restricted to internal-only use.
go
// internal/middleware/middleware.go:73-103
// getNodeSecret from header or query
func getNodeSecret(c *gin.Context) (secret string) {
if secret = c.GetHeader("X-Node-Secret"); secret != "" {
return secret
}
return c.Query("node_secret")
}
// AuthRequired is a middleware that checks if the user is authenticated
func AuthRequired() gin.HandlerFunc {
return func(c *gin.Context) {
abortWithAuthFailure := func() {
c.AbortWithStatusJSON(http.StatusForbidden, gin.H{
"message": "Authorization failed",
})
}
xNodeID := getXNodeID(c)
if xNodeID != "" {
c.Set("ProxyNodeID", xNodeID)
}
// Check node secret authentication
if nodeSecret := getNodeSecret(c); nodeSecret != "" && nodeSecret == settings.NodeSettings.Secret {
initUser := user.GetInitUser(c)
c.Set("Secret", nodeSecret)
c.Set("user", initUser)
c.Next()
return
}
This authentication logic converts knowledge of the leaked node secret into an authenticated request as initUser. That makes the disclosed token immediately reusable for cross-node privilege escalation.
POC
Prerequisites: (1) the attacker has a valid low-privileged user account, (2) at l…
Check your whole app
Dependencies are only half of it. Free and read-only: before you push, run npx shippable-dev scan localhost:3000 in your project folder, no account needed. For your live app, you prove it's yours with a one-line tag first.
References
- github.com/0xJacky/nginx-ui/security/advisories/GHSA-32gc-wf3m-78w9
- github.com/0xJacky/nginx-ui/commit/0ecbd106c37b5143be14880c9447a66135151512
- github.com/0xJacky/nginx-ui/releases/tag/v2.5.0
- github.com/advisories/GHSA-32gc-wf3m-78w9
- github.com/0xJacky/nginx-ui
Merged from GitHub Advisory Database, OSV. Last updated 24 Oct 2026. All vulnerabilities · RSS · JSON