llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/0xJacky/Nginx-UI

GHSA-QPXQ-MR8M-WCF2

OTP secure-session step-up missing on system/restart, core-upgrade websocket, and upstream socket PUT (follow-up to GHSA-h246-wpgf-vmq5)

Sin parche publicado
Descargar PNG JSON
CVSS
—
high
Fuente: —
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición28 dDesde la divulgación, 22 oct 2026, 1:59 a. m.
Detección27 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada
Explotación
Remediación
Monitoreo
Detectada +1
22 oct 26
18 nov 26
19 nov 26
22 oct 26
29 oct 26
5 nov 26
12 nov 26
19 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-QPXQ-MR8M-WCF2 divulgada
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Note on a duplicate report

I opened an earlier report on this same issue a short time ago under a secondary account (`apskedenap`) that I use for throwaway testing. Please disregard that one and treat this submission as the canonical one for credit purposes.

Summary

GHSA-h246-wpgf-vmq5 fixed a missing `middleware.RequireSecureSession()` wrapper on the `api/cluster` router and explicitly listed three other routes as unverified: "secondary lower-confidence items worth checking in the same pass... I did not fully trace these": the `system/restart` handler, the core-upgrade websocket, and the upstream socket PUT endpoint.

All three are still missing the secure-session step-up at the current HEAD (`db15caf4c9b339f677eabaa918b8cc9e37380f74`, 2026-10-10). No commit has touched either file since the GHSA-h246-wpgf-vmq5 publish date (2026-10-09).

Details

1. `system/restart`

`api/system/router.go`, `InitPrivateRouter`:

// Restarting takes the whole demo container down with it.
r.Any("system/restart", middleware.RejectInDemo(), Restart)

Only `RejectInDemo()` guards this route (it just blocks the public demo deployment). There is no `RequireSecureSession()`. An authenticated user holding only a JWT, without a fresh secure session, can restart the whole nginx-ui service.

2. Core-upgrade websocket

Same file, `InitWebSocketRouter`:

r.GET("upgrade/perform", middleware.RejectInDemo(), PerformCoreUpgrade)

Same gap: `PerformCoreUpgrade` runs the binary self-upgrade with only `RejectInDemo()`, no secure-session requirement.

3. `PUT /upstream/socket/:socket`

`api/upstream/router.go`, `InitHTTPRouter`:

func InitHTTPRouter(r *gin.RouterGroup) {
	r.GET("/upstream/availability", GetAvailability)
	r.GET("/upstream/sockets", GetSocketList)
	r.GET("/upstream/health_check/status", GetHealthCheckStatus)
	r.PUT("/upstream/socket/:socket", UpdateSocketConfig)

	// Standalone upstream groups managed by Nginx UI.
	r.GET("/upstreams", ListManagedUpstreams)
	r.GET("/upstreams/:name", GetManagedUpstream)
	r.POST("/upstream/preview", PreviewManagedUpstream)

	o := r.Group("", middleware.RequireSecureSession())
	{
		o.POST("/upstreams", CreateManagedUpstream)
		o.POST("/upstreams/:name", UpdateManagedUpstream)
		o.DELETE("/upstreams/:name", DeleteManagedUpstream)
		o.POST("/upstream/server_state", SetUpstreamServerState)
		o.POST("/upstream/convert", ConvertSiteUpstream)
	}
}

`UpdateSocketConfig` is registered directly on the bare `r` group, before and outside the `RequireSecureSession()` subgroup that its five sibling mutation endpoints in the same file sit inside. It mutates upstream socket configuration with only a JWT.

Attacker model and impact

Same attacker as the parent advisory: an authenticated, OTP-enabled user whose JWT is stolen or persisted but who does not hold a fresh secure session. That is exactly the actor the step-up exists to stop. All three routes let that actor reach a mutation class the project's own security model already treats as step-up-worthy on the sibling routes living in the same files (`nginx/reload`, `nginx/restart`, and the other five upstream mutation endpoints).

Verification

Source-verified at the HEAD commit above by reading the current router files directly. I did not stand up a live nginx-ui instance.

Fix

Tested by cloning the repository and applying the following patch; `git diff` shown below (I did not run the full test suite, only reviewed the diff for correctness against the existing pattern used by the sibling routes):

diff --git a/api/system/router.go b/api/system/router.go
index 974a62e..6f43fa6 100644
--- a/api/system/router.go
+++ b/api/system/router.go
@@ -32,7 +32,7 @@ func InitPrivateRouter(r *gin.RouterGroup) {
 
 	r.Any("system/stats", GetProcessStats)
 	// Restarting takes the whole demo container down with it.
-	r.Any("system/restart", middleware.RejectInDemo(), Restart)
+	r.Any("system/restart", middleware.RejectInDemo(), middleware.RequireSecureSession(), Restart)
 
 	g := r.Group("self_check")
 	g.GET("", SelfCheck)
@@ -44,6 +44,6 @@ func InitWebSocketRouter(r *gin.RouterGroup) {
 	// internal/upgrader/binary.go already turns the install step into a no-op in
 	// demo mode, but the archive is still downloaded and verified first. Refuse
 	// before any of that runs.
-	r.GET("upgrade/perform", middleware.RejectInDemo(), PerformCoreUpgrade)
+	r.GET("upgrade/perform", middleware.RejectInDemo(), middleware.RequireSecureSession(), PerformCoreUpgrade)
 	r.GET("self_check/websocket", CheckWebSocket)
 }
diff --git a/api/upstream/router.go b/api/upstream/router.go
index c454a4a..2948b27 100644
--- a/api/upstream/router.go
+++ b/api/upstream/router.go
@@ -9,7 +9,6 @@ func InitHTTPRouter(r *gin.RouterGroup) {
 	r.GET("/upstream/availability", GetAvailability)
 	r.GET("/upstream/sockets", GetSocketList)
 	r.GET("/upstream/health_check/status", GetHealthCheckStatus)
-	r.PUT("/upstream/socket/:socket", UpdateSocketConfig)
 
 	// Standalone upstream groups managed by Nginx UI.
 	r.GET("/upstreams", ListManagedUpstreams)
@@ -18,6 +17,7 @@ func InitHTTPRouter(r *gin.RouterGroup) {
 
 	o := r.Group("", middleware.RequireSecureSession())
 	{
+		o.PUT("/upstream/socket/:socket", UpdateSocketConfig)
 		o.POST("/upstreams", CreateManagedUpstream)
 		o.POST("/upstreams/:name", UpdateManagedUpstream)
 		o.DELETE("/upstreams/:name", DeleteManagedUpstream)

This mirrors the exact pattern already used for `nginx/reload`/`nginx/restart` and the other upstream mutation endpoints, so it should not require any other change (no new middleware, no new import).

---

If this is useful, credit in the published advisory would be appreciated.

Versiones

Rangos afectados

Afectada Corregida Última
github.com/0xJacky/Nginx-UI< 2.9.0
v1.9.9
2.9.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/0xJacky/Nginx-UI
Sin parche — — v1.9.9 afectada
Versiones corregidas2.9.0
Explotación

Arsenal público

Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.

Referencias
Advisoryhttps://github.com/0xJacky/nginx-ui/security/advisories/GHSA-qpxq-mr8m-wcf2

Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.