GHSA-MFMC-45G6-4XW2
Forwarding headers allow bypass of global per-IP HTTP rate limits
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-MFMC-45G6-4XW2 divulgada | |
| Remediación | Parche v0.13.56 | github.com/daptin/daptin · 0 d desde divulgación | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Impact
Unauthenticated clients can bypass Daptin's global HTTP rate limits by rotating `X-Forwarded-For` or `X-Real-IP`. The limiter used Gin's `ClientIP()` while the server retained Gin's default trust of forwarding headers from any peer. Each forged address therefore selected a fresh rate-limit bucket.
This affects the default per-IP/path allowance and administrator-configured route limits, including backend and subsite HTTP routes. It weakens anonymous abuse protection, including the global throttle applied before password sign-in. It does not bypass resource or action authorization, account metering, or the separate OTP attempt protection.
Affected versions
Versions before 0.13.56 that use the forwarding-header-derived client IP for the global limiter are affected. The report identified main at `19b7ca4`; the same keying behavior is present in earlier limiter implementations and in release 0.13.55.
Patch
Upgrade to Daptin v0.13.56 https://github.com/daptin/daptin/releases/tag/v0.13.56 or apply commit 9e19a9ab https://github.com/daptin/daptin/commit/9e19a9abbe203b1d75679c21b7fc60a3cb6eb861. The shared backend/subsite limiter now keys on `c.RemoteIP()`, taking the IP from the connection's remote address and ignoring forwarding headers. Changing source ports does not create new buckets.
Behind a reverse proxy, clients using the same proxy IP share an allowance. Apply individual client IP limits at the ingress proxy when needed, and size Daptin's route limits for aggregate proxy traffic. See Rate Limiting https://github.com/daptin/daptin/blob/v0.13.56/wiki/Rate-Limiting.md.
The source fix is committed and tagged. Release binary and Docker builds run asynchronously in GitHub Actions; their completion is separate from publication of this advisory.
Workaround
Until upgraded, enforce request limits at a trusted ingress proxy and prevent direct access that bypasses it. Strip client-supplied forwarding headers before proxying requests to Daptin.
Validation
Regression tests reproduced the bypass before the fix and pass after it. Coverage includes both forwarding headers, IPv4 and IPv6 peers, changing source ports, independent peer allowances, backend and subsite routing, local fallback and Olric counters, and denial before downstream handlers execute.
A live HTTP E2E test configures `/statistics` to two requests per second through the administrator configuration API, reloads it through the restart action, and verifies anonymous requests receive HTTP 429 despite rotating either forwarding header.
Passed locally: `go test ./...`, the opt-in real HTTP E2E test, `go vet ./server`, and `git diff --check`.
Credit
Reported by lanjianchun https://github.com/lanjianchun.
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
gogithub.com/daptin/daptin |
Corregida | v0.13.56 | 0 d | v0.13.57 no afectada |
0.13.56v0.13.56Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/daptin/daptin/security/advisories/GHSA-mfmc-45g6-4xw2Las referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
