4.1medium
Gokapi has Privilege Escalation in File Replace
- Severity
- 4.1medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.19% (higher than 9% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-j6jp-78w8-34x6GO-2026-4696
Description
Gokapi is a self-hosted file sharing server with automatic expiration and encryption support. Prior to 2.2.4, An insufficient authorization check in the file replace API allows a user with only list visibility permission (UserPermListOtherUploads) to delete another user's file by abusing the deleteNewFile flag, bypassing the requirement for UserPermDeleteOtherUploads. This vulnerability is fixed in 2.2.4.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Forceu Gokapi | < 2.2.4, before 2.2.4 | CVE List, NVD |
| github.com/forceu/gokapi (Go) | before 2.2.4, all versions | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 4.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:L/A:N |
| GitHub | 4.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:L/A:N |
| NVD | 4.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/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 2.2.4, An insufficient authorization check in the file replace API allows a user with only list visibility permission (UserPermListOtherUploads) to delete another user's file by abusing the deleteNewFile flag, bypassing the requirement for UserPermDeleteOtherUploads. This vulnerability is fixed in 2.2.4.
GitHub Advisory Database
Summary
An insufficient authorization check in the file replace API allows a user with only list visibility permission (UserPermListOtherUploads) to delete another user's file by abusing the deleteNewFile flag, bypassing the requirement for UserPermDeleteOtherUploads.
Impact
Any authenticated user with PERM_REPLACE (replace own files) and PERM_LIST (view other users' uploads) can delete any other user's file without needing PERM_DELETE.
Go Vulnerability Database
Gokapi vulnerable to Privilege Escalation in File Replace 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.4.
NVD (es)
Gokapi es un servidor de intercambio de archivos autoalojado con soporte para expiración automática y cifrado. Antes de la versión 2.2.4, una comprobación de autorización insuficiente en la API de reemplazo de archivos permite a un usuario con solo permiso de visibilidad de lista (UserPermListOtherUploads) eliminar el archivo de otro usuario abusando del flag deleteNewFile, eludiendo el requisito de UserPermDeleteOtherUploads. Esta vulnerabilidad se corrigió en la versión 2.2.4.
References
| https://github.com/Forceu/Gokapi/security/advisories/GHSA-j6jp-78w8-34x6 | advisory, vendor-advisory, web | |
| https://github.com/Forceu/Gokapi/releases/tag/v2.2.4 | product, release-notes, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-30943 | advisory | |
| https://github.com/Forceu/Gokapi | package | |
| https://pkg.go.dev/vuln/GO-2026-4696 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-30943 changed 2026-03-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-j6jp-78w8-34x6 changed 2026-03-24 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2026-4696 changed 2026-03-23 | CC-BY-4.0 |
| NVD | CVE-2026-30943 changed 2026-06-17 | Public domain |