CVE-2026-30943
JSON

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 packageVersionsReported by
Forceu Gokapi< 2.2.4, before 2.2.4CVE List, NVD
github.com/forceu/gokapi (Go)before 2.2.4, all versionsGitHub Advisory Database, Go Vulnerability Database

All scores

GitHub_M4.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:L/A:N
GitHub4.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:L/A:N
NVD4.1medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:N/I:L/A:N

Classification

CWE-863

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

Sources

SourceRecordLicence
CVE ListCVE-2026-30943 changed 2026-03-13CVE Terms of Use
GitHub Advisory DatabaseGHSA-j6jp-78w8-34x6 changed 2026-03-24CC-BY-4.0
Go Vulnerability DatabaseGO-2026-4696 changed 2026-03-23CC-BY-4.0
NVDCVE-2026-30943 changed 2026-06-17Public domain