llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · github.com/nezhahq/nezha

GHSA-228W-P4H4-6RVW

Cross-tenant server-ID enumeration via differential responses in getServerConfig and setServerConfig

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
4.3
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N Fuente: GitHub
ExplotaciónSin evidenciaNo figura en CISA KEV
Exploits públicos0Ninguno conocido
ParcheSin parcheEl fabricante no ha publicado corrección
Exposición50 dDesde la divulgación, 30 sept 2026, 11:42 p. m.
Detección49 dDesde la divulgación hasta su ingreso al índice
Timeline

Ciclo de vida de la vulnerabilidad

Hoy
Divulgación
Publicada +1
Explotación
Remediación
Monitoreo
Detectada +1
1 oct 26
19 nov 26
20 nov 26
1 oct 26
13 oct 26
26 oct 26
7 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-228W-P4H4-6RVW divulgada · CVSS 4.3 (GitHub)
Divulgación Modificada Última actualización del registro
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Maintainer resolution

Fixed in v2.3.15 https://github.com/nezhahq/nezha/releases/tag/v2.3.15 by commit 36b742a7 https://github.com/nezhahq/nezha/commit/36b742a7e9a81ed782363dd19efd77b7030fbd0f. Affected versions: `>= 1.7.0, < 2.3.15`. Patched versions: `>= 2.3.15`.

Summary

A low-privilege authenticated user (RoleMember) can determine, for any integer server ID, whether that server exists and is owned by a different user, versus not existing at all. The endpoints `GET /api/v1/server/config/{id}` (`getServerConfig`) and `POST /api/v1/server/config` (`setServerConfig`) return `{"error":"permission denied"}` for an existing server the caller does not own, but a distinguishable success payload (`{"success":true,"data":null}` for GET, `{"success":true,"data":{}}` for POST) for an ID that does not exist. Since nezha server IDs are small sequential integers, a member can sweep the ID range and enumerate other tenants' server IDs and confirm which are present. Required privilege is any authenticated member account, no agent and no ownership. Security consequence is unauthorized cross-tenant infrastructure inventory disclosure (information disclosure / enumeration). Severity Low.

Details

Per-object authorization in nezha is `model/common.go` `HasPermission(ctx)`, which returns true only when the caller is `RoleAdmin` or `caller.ID == obj.UserID`. The two server-config handlers branch on ownership and on existence separately, producing different observable response shapes for the two negative states.

`cmd/dashboard/controller/server.go` `getServerConfig` (current main / v2.3.14):

s, ok := singleton.ServerShared.Get(id)
if !ok {
    return "", nil                                   // id absent -> success:true, data:null
}
if !s.HasPermission(c) {
    return "", singleton.Localizer.ErrorT("permission denied") // id exists, foreign -> error
}

A client-supplied path integer flows directly into the in-memory `ServerShared` lookup and the two "no" conditions return different bodies. `setServerConfig` splits identically: for each submitted ID, an existing-but-foreign ID returns `permission denied`, while an unknown ID is silently dropped, leaving `ServerTaskResponse` empty.

The maintainer-authored fix for the same class of defect confirms the intended invariant. Commit `710a2c73` ("fix(controller): hide foreign server IDs from forceUpdateServer response", 2026-05-18) states that foreign versus unknown IDs "MUST be indistinguishable in the response, otherwise the response shape leaks server-ID existence/online-state, letting a RoleMember enumerate other users' machines" and drops both into the same bucket. `getServerConfig` and `setServerConfig` were not brought in line with that treatment and still leak.

PoC

> nezha-server-config-exists-oracle-PoC.zip https://github.com/user-attachments/files/32728272/nezha-server-config-exists-oracle-PoC.zip

See the attached `nezha-server-config-exists-oracle-PoC.zip`.

  1. Run `deployment/deploy.sh`. It starts the official v2.3.14 arm64 dashboard binary on `127.0.0.1:8008`, lets the empty-DB bootstrap create `admin`/`admin`, creates member user `member1`, and seeds two SQLite server rows owned by different users (`id=100` by admin, `id=101` by member1).
  2. Run `poc/server-config-exists-oracle/poc.sh`. It logs in as `member1` and probes both endpoints with a foreign existing ID (100), the caller's own ID (101), and a definitely absent ID (999999).

Observed vulnerable output (captured in `poc/execution-trace.txt`):

id=100 (foreign, exists)   -> {"error":"permission denied"}
id=101 (own)               -> {"success":true,"data":null}
id=999999 (absent)         -> {"success":true,"data":null}
POST servers=[100]         -> {"error":"permission denied"}
POST servers=[999999]      -> {"success":true,"data":{}}

The difference between the `100` and `999999` responses is the oracle. The negative control in the script confirms this is disclosure only: `PATCH /api/v1/server/100` returns `permission denied` and leaves the admin-owned server name unchanged, so there is no cross-tenant write.

Impact

An authenticated member can enumerate the set of existing server IDs belonging to other users and distinguish live servers, mapping the deployment's multi-tenant inventory. This breaks the trust boundary nezha otherwise enforces through `HasPermission`/`HideForGuest`, where a member should not learn that another user's server exists. There is no direct data disclosure or mutation, so the realistic impact is information disclosure that assists follow-on targeting. Severity Low.

Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.

Vector CVSS 3.1

Desglose de métricas

Opción resaltada = valor del vector · izquierda = peor caso · GitHub
Vector de ataqueAV:N
RedAdyacenteLocalFísica
ComplejidadAC:L
BajaAlta
PrivilegiosPR:L
NingunoBajosAltos
InteracciónUI:N
NingunaRequerida
AlcanceS:U
CambiadoSin cambio
ConfidencialidadC:L
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:N
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
github.com/nezhahq/nezha≥ 1.7.0 < 2.3.15
1.7.0
v1.14.14
2.3.15
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gogithub.com/nezhahq/nezha
Sin parche — — v1.14.14 afectada
Versiones corregidas2.3.15
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/nezhahq/nezha/security/advisories/GHSA-228w-p4h4-6rvw

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