Description
Gonic through 0.23.0 contains a memory exhaustion vulnerability in the POST /admin/change_avatar_do handler that decodes uploaded avatars without checking declared image dimensions. Authenticated low-privileged users can upload a compressible PNG, GIF, or JPEG declaring huge dimensions to force multi-gigabyte allocations and crash gonic for all users.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| sentriz | gonic | 0 ≤0.23.0 | — |
References
- https://github.com/sentriz/gonic/blob/v0.23.0/server/ctrladmin/handlers.go#L677-L696
- https://github.com/sentriz/gonic/pull/754
- https://github.com/sentriz/gonic/commit/3294de97e583ce3254120a68911684a095322911
- https://www.vulncheck.com/advisories/gonic-through-0.23.0-memory-exhaustion-via-avatar-upload-image-dimensions