5.4medium
Gokapi: Privilege escalation via incomplete API-key permission revocation on user rank demotion
- Severity
- 5.4medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.13% (higher than 2% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-q658-hfpg-35qcGO-2026-4626
Description
Gokapi is a self-hosted file sharing server with automatic expiration and encryption support. Prior to version 2.2.3, a privilege escalation vulnerability in the user rank demotion logic allows a demoted user's existing API keys to retain ApiPermManageFileRequests and ApiPermManageLogs permissions, enabling continued access to upload-request management and log viewing endpoints after the user has been stripped of all privileges. This issue has been patched in version 2.2.3.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Forceu Gokapi | < 2.2.3, before 2.2.3 | CVE List, NVD |
| github.com/forceu/gokapi (Go) | before 2.2.3, all versions | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
| NVD | 5.4medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
Gokapi is a self-hosted file sharing server with automatic expiration and encryption support. Prior to version 2.2.3, a privilege escalation vulnerability in the user rank demotion logic allows a demoted user's existing API keys to retain ApiPermManageFileRequests and ApiPermManageLogs permissions, enabling continued access to upload-request management and log viewing endpoints after the user has been stripped of all privileges. This issue has been patched in version 2.2.3.
GitHub Advisory Database
Summary
A privilege escalation vulnerability in the user rank demotion logic allows a demoted user's existing API keys to retain ApiPermManageFileRequests and ApiPermManageLogs permissions, enabling continued access to upload-request management and log viewing endpoints after the user has been stripped of all privileges.
Impact
Any user who previously held Admin rank and had API keys with ApiPermManageFileRequests or ApiPermManageLogs retains those capabilities after demotion. This allows offboarded or demoted users to:
- Create, list, and delete upload requests
- Read application logs and system status
Go Vulnerability Database
Gokapi has privilege escalation via incomplete API-key permission revocation on user rank demotion in github.com/forceu/gokapi.
NOTE: The source advisory for this report contains additional versions that could not be automatically mapped to standard Go module versions.
(If this is causing false-positive reports from vulnerability scanners, please suggest an edit to the report.)
The additional affected modules and versions are: github.com/forceu/gokapi before v2.2.3.
NVD (es)
Gokapi es un servidor de intercambio de archivos autoalojado con expiración automática y soporte de cifrado. Antes de la versión 2.2.3, una vulnerabilidad de escalada de privilegios en la lógica de degradación de rango de usuario permite que las claves API existentes de un usuario degradado retengan los permisos ApiPermManageFileRequests y ApiPermManageLogs, lo que permite el acceso continuo a los puntos finales de gestión de solicitudes de carga y visualización de registros después de que al usuario se le hayan retirado todos los privilegios. Este problema ha sido parcheado en la versión 2.2.3.
References
| https://github.com/Forceu/Gokapi/security/advisories/GHSA-q658-hfpg-35qc | advisory, vendor-advisory, web | |
| https://github.com/Forceu/Gokapi/releases/tag/v2.2.3 | release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-29061 | advisory | |
| https://github.com/Forceu/Gokapi | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-29061 changed 2026-03-06 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-q658-hfpg-35qc changed 2026-03-23 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4626 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-29061 changed 2026-06-17 | Public domain |