GHSA-9HFJ-63Q2-JHJW
Nginx log advanced-indexing toggle and destructive index rebuild lack interactive secure-session step-up
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-9HFJ-63Q2-JHJW divulgada · CVSS 5.4 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
## Summary
The nginx-log advanced-indexing controls — `POST /api/nginx_log/settings/advanced_indexing/enable|disable` and `POST /api/nginx_log/index/rebuild` — have no interactive secure-session (OTP/passkey) step-up. The enable/disable routes persist an indexing setting and start/stop background services; the rebuild route launches a destructive full re-index that first calls `DestroyAllIndexes`. Every equivalent settings-persisting write elsewhere in Nginx-UI is gated by `RequireSecureSession`.
## Root Cause
`InitRouter` for nginx_log mounts these routes under `AuthRequired()` + `Proxy()` only (bare `g` group, `routers.go:132`), with no `RequireSecureSession`:
- `POST /api/nginx_log/settings/advanced_indexing/enable` → `EnableAdvancedIndexing` → `settings.Update(func(){ NginxLogSettings.IndexingEnabled = true })` + `InitializeServices`.
- `.../disable` → `DisableAdvancedIndexing` → persist `IndexingEnabled=false` + `StopServices()`.
- `POST /api/nginx_log/index/rebuild` → `RebuildIndex` launches an async rebuild; a full rebuild (empty path) calls `nginx_log.DestroyAllIndexes` then re-indexes.
## Impact
Persistent indexing-settings drift and loss of log observability when disabled (I:L), plus destruction of existing search index data and heavy CPU/IO/disk consumption on a full rebuild (A:L) — all without the step-up that guards equivalent settings writes. Via `Proxy()` the actions reach child cluster nodes.
Proof of Concept
POST /api/nginx_log/settings/advanced_indexing/disable HTTP/1.1
Authorization: Bearer <valid JWT, no fresh X-Secure-Session-ID>
POST /api/nginx_log/index/rebuild HTTP/1.1
Authorization: Bearer <valid JWT>
(empty body → full rebuild → DestroyAllIndexes + reindex)## Attack Chain
1. Entry: `POST /api/nginx_log/settings/advanced_indexing/enable` with a valid JWT of a 2FA-enabled admin without fresh step-up.
- Guard: `AuthRequired()` + `Proxy()` on the bare group (`api/nginx_log/router.go`; `routers.go:132`). Bypass proof: no `RequireSecureSession` on the nginx_log group; sibling settings writes elsewhere require it.
2. `settings.Update` persists `IndexingEnabled` and `InitializeServices`/`StopServices()` start or halt log indexing on the controller and, via Proxy, child nodes.
3. Entry (destructive): `POST /api/nginx_log/index/rebuild` with no JSON body → `request.Path = ""` → full rebuild.
- Guard: `currentStatus.NginxLogIndexing` in-progress check and per-path `IsTaskInProgress`. Bypass proof: `NginxLogIndexing` is set true only inside the async `performAsyncRebuild` goroutine AFTER the handler returns, so the first destructive call is not blocked; the per-path guard is gated on `request.Path != ""` and is skipped for a full rebuild.
4. Sink: goroutine → `performAsyncRebuild(indexer, "")` → `nginx_log.DestroyAllIndexes(ctx)` (`internal/nginx_log/modern_services.go:695`) then full reindex.
5. Impact: all search indexes destroyed (I:L — regenerable) + heavy reindex / degraded log search (A:L).
## Bypass Evidence
`git show v2.8.4:api/nginx_log/router.go` confirms the three routes present with no step-up middleware on release v2.8.4. The nginx_log indexing routes are NOT in the GHSA-5v7c-xpfp-p65m covered route list and are not a GHSA-h246 cluster suspect.
## Affected Versions
`<= 2.8.4` (verified byte-identical v2.8.4 → HEAD; no post-release fix).
## Suggested Fix
Mount the advanced-indexing enable/disable and index/rebuild routes under `RequireSecureSession` (and `RejectInDemo` for the destructive rebuild), matching the step-up policy applied to equivalent settings-persisting writes.
---
Reported by zx (Jace) — GitHub: @manus-use
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/0xJacky/Nginx-UI |
Sin parche | — | — | v1.9.9 afectada |
2.9.0Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/0xJacky/nginx-ui/security/advisories/GHSA-9hfj-63q2-jhjwLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
