Skip to content
OpenAdvisories
Medium · 4.8 CVE-2025-48494 EUVD-2025-16640GHSA-95rc-wc32-gm53GO-2025-3737

Gokapi vulnerable to stored XSS via uploading file with malicious file name

Published Jun 2, 2025 · Updated Jun 2, 2025 · Assigned by GitHub_M

Description

Gokapi is a self-hosted file sharing server with automatic expiration and encryption support. When using end-to-end encryption, a stored cross-site scripting vulnerability can be exploited by uploading a file with JavaScript code embedded in the filename. After upload and every time someone opens the upload list, the script is then parsed. Prior to version 2.0.0, there was no user permission system implemented, therefore all authenticated users were already able to see and modify all resources, even if end-to-end encrypted, as the encryption key had to be the same for all users using a version prior to 2.0.0. If a user is the only authenticated user using Gokapi, they are not affected. This issue has been fixed in v2.0.0. A possible workaround would be to disable end-to-end encryption.

Affected products

VendorProductAffectedFixed
Forceu Gokapi < 2.0.0 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
openSUSE Tumbleweed govulncheck-vulndb 0.0.20250612T141001-1.1 openSUSE-SU-2025:15225-1

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/forceu/gokapi >= 1.0.1, <= 1.9.6 — GHSA-95rc-wc32-gm53
Go github.com/forceu/gokapi < 0.0.0-20250530191232-343cc566cfd7 0.0.0-20250530191232-343cc566cfd7 GHSA-95rc-wc32-gm53
Go github.com/forceu/gokapi all versions — GO-2025-3737

Advisories 1

References