llamaCVEVulnerability Intelligence
/
Advisory · GitHub · Go · code.vikunja.io/api

GHSA-3X3M-2J93-W46J

Unbounded avatar size cache exhausts server memory

Sin parche publicado
Descargar PNG JSON
CVSS 3.1
6.5
Media
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H Fuente: GitHub
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, 5:07 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
20 nov 26
22 oct 26
29 oct 26
5 nov 26
12 nov 26
20 nov 26
FechaFaseEventoDetalle
Divulgación Publicada GHSA-3X3M-2J93-W46J divulgada · CVSS 6.5 (GitHub)
Monitoreo Detectada Ingresó al índice
Monitoreo Verificada Última verificación contra las fuentes
Resumen
Descripción del advisory
Texto original · GitHub · en inglés

Summary

The avatar endpoint keeps a separately resized copy of each user's avatar for every distinct `size` it's asked for, and nothing evicts or expires them. Since `size` is only clamped to the configured maximum (default 1024), any logged-in user can make one uploaded avatar occupy around a gigabyte of memory, freed only on restart or when that user changes their avatar.

Details

`size` is clamped to `service.maxavatarsize` (default 1024, `pkg/config/config.go:396`; `pkg/modules/avatar/avatar.go:98`). `upload.go:65` rejects `size<=0` and v2 enforces `minimum:"1"` (`v2/avatar.go:39`), so each account gets about 1024 distinct cache keys. `RememberValue` → `Put` stores them without a TTL (`pkg/modules/keyvalue/keyvalue.go:133-155`), and the memory store's sweep only walks TTL'd keys (`pkg/modules/keyvalue/memory/memory.go:79-88`).

Proof of concept

`upload.Provider.GetAvatar` caches under one key per size (`avatar_upload_<userID>_<size>`) via `keyvalue.RememberValue`, which stores with `Put` and no TTL; the default in-memory store is a plain map with no size cap and no eviction. A noisy PNG stays near 3 bytes per pixel, so sizes 1 to 1024 sum to about 1 GiB.

On a default `vikunja/vikunja:2.7.0` instance (open registration, rate limiting off, in-memory keyvalue):

API=http://host/api/v1
# Log in as any user, upload a 1024x1024 noise image as your avatar:
curl -X PUT -H "Authorization: Bearer $TOKEN" -F avatar=@noise.png $API/user/settings/avatar/upload
# Fetch your own avatar once at each allowed size (~1024 GETs):
curl -H "Authorization: Bearer $TOKEN" "$API/avatar/$USERNAME?size=[1-1024]"

Resident memory climbed from about 30 MiB to about 1.8 GiB for that one account, repeating the same sizes added nothing, and it stayed put while idle. A 1.5 GB instance was OOM-killed partway through a single sweep. The 2.6.0 pixel-cap change (GHSA-4vh2) bounds a single decode, not the number of cached copies.

Impact

Any authenticated user can exhaust a default instance and get the API process OOM-killed, and registration is open by default, so each extra account adds roughly another gigabyte. A link-share token can do the same against any user's uploaded avatar. Rate limiting is off by default; with it on at the default 100 a minute, one account still fills its gigabyte in about ten minutes.

Fix

Map `size` to a small discrete allowlist before it reaches the cache key, in the shared `GetAvatarForUsername` (`pkg/modules/avatar/avatar.go`), as `GetPreviewSizeFromString` does for task-attachment previews. Doing it there also bounds the gravatar provider's per-size cache, which has the same problem with negative and zero sizes on v1.

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:N
AltoBajoNinguno
IntegridadI:N
AltoBajoNinguno
DisponibilidadA:H
AltoBajoNinguno
Versiones

Rangos afectados

Afectada Corregida Última
code.vikunja.io/api≤ 2.7.0
v0.24.6
2.7.0
Remediación

Estado del parche por paquete

Paquete / productoEstadoCorregida enDesde divulgaciónÚltima versión
gocode.vikunja.io/api
Sin parche — — v0.24.6 afectada
Explotación

Arsenal público

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

Referencias
Advisoryhttps://github.com/go-vikunja/vikunja/security/advisories/GHSA-3x3m-2j93-w46j

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