CVE-2025-48494: Github.com/forceu/gokapi Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-95rc-wc32-gm53
CWE-87 CWE-79
Published
Advisory Summary

CVE-2025-48494 is a MODERATE cross-site scripting vulnerability (CWE-87: Improper Neutralization of Alternate XSS Syntax) affecting Github.com/forceu/gokapi libraries in the Go ecosystem. The issue involves gokapi vulnerable to stored xss via uploading file with malicious file name. Remediation is available by upgrading affected packages to version 0.0.0-20250530191232-343cc566cfd7.

CVE-2025-48494 at a Glance

CVE Identifier CVE-2025-48494
GHSA Identifier GHSA-95rc-wc32-gm53
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-87: Improper Neutralization of Alternate XSS Syntax
Affected Product Github.com/forceu/gokapi
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-48494

To remediate this vulnerability, upgrade all affected Github.com/forceu/gokapi dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/forceu/gokapi fixed: Latest secure release
Upgrade github.com/forceu/gokapi to Latest secure release
github.com/forceu/gokapi fixed: 0.0.0-20250530191232-343cc566cfd7
Upgrade github.com/forceu/gokapi to 0.0.0-20250530191232-343cc566cfd7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/forceu/gokapi

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-48494, inspect your project dependencies for Github.com/forceu/gokapi:

inspect dependencies for github.com/forceu/gokapi

Analyze the terminal output to locate any version of Github.com/forceu/gokapi in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.0.0-20250530191232-343cc566cfd7), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-87: Improper Neutralization of Alternate XSS Syntax, where the product does not neutralize or incorrectly neutralizes user-controlled input for alternate script syntax. In Github.com/forceu/gokapi, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact When using end-to-end encryption, a stored XSS 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. With the affected versions <v2.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 with <v2.0. Nethertheless with XSS, other attack vectors like redirection or crypto mining would be possble. ### Patches This CVE has been fixed in v2.0.0 ### Workarounds If you are the only authenticated user using Gokapi, you are not affected. A workaround would be to disable end-to-end encryption.

CVE-2025-48494 Affected Github.com/forceu/gokapi Versions

2 component(s)
Fixed Versions:
0.0.0-20250530191232-343cc566cfd7
Product / Package Ecosystem Affected Versions Fixed Version
github.com/forceu/gokapi
Go
≥ 1.0.1
≤ 1.9.6
github.com/forceu/gokapi
Go
< 0.0.0-20250530191232-343cc566cfd7
0.0.0-20250530191232-343cc566cfd7

References

Frequently Asked Questions

What is CVE-2025-48494?
CVE-2025-48494 is a security vulnerability in Github.com/forceu/gokapi involving Gokapi vulnerable to stored XSS via uploading file with malicious file name under CWE-87: Improper Neutralization of Alternate XSS Syntax.
Which Github.com/forceu/gokapi versions are affected?
Affected versions include releases prior to 0.0.0-20250530191232-343cc566cfd7 across affected packages: github.com/forceu/gokapi.
What version fixes CVE-2025-48494?
Upgrading to 0.0.0-20250530191232-343cc566cfd7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/forceu/gokapi affected?
Yes, github.com/forceu/gokapi is affected in releases prior to Latest secure release, 0.0.0-20250530191232-343cc566cfd7. Upgrade your dependency to Latest secure release, 0.0.0-20250530191232-343cc566cfd7 or later.
What CWE is associated with CVE-2025-48494?
CVE-2025-48494 is classified under CWE-87: Improper Neutralization of Alternate XSS Syntax (The product does not neutralize or incorrectly neutralizes user-controlled input for alternate script syntax.).
How can I check Go dependencies for CVE-2025-48494?
Run the dependency tree command: 'inspect dependencies for github.com/forceu/gokapi'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-95rc-wc32-gm53",
  "modified" : "2025-08-26T20:09:18Z",
  "published" : "2025-06-03T06:28:08Z",
  "aliases" : [ "CVE-2025-48494" ],
  "summary" : "Gokapi vulnerable to stored XSS via uploading file with malicious file name",
  "details" : "### Impact\n\nWhen using end-to-end encryption, a stored XSS 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.\n\nWith the affected versions <v2.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 with <v2.0. Nethertheless with XSS, other attack vectors like redirection or crypto mining would be possble.\n\n### Patches\n\nThis CVE has been fixed in v2.0.0\n\n### Workarounds\n\nIf you are the only authenticated user using Gokapi, you are not affected. A workaround would be to disable end-to-end encryption.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:N/VI:N/VA:N/SC:L/SI:L/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/forceu/gokapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.1"
      }, {
        "last_affected" : "1.9.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/forceu/gokapi"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.0.0-20250530191232-343cc566cfd7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Forceu/Gokapi/security/advisories/GHSA-95rc-wc32-gm53"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48494"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Forceu/Gokapi/commit/343cc566cfd7f4efcd522c92371561d494aed6b0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Forceu/Gokapi"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Forceu/Gokapi/releases/tag/v2.0.0"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2025-3737"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-87" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-03T06:28:08Z",
    "nvd_published_at" : "2025-06-02T11:15:22Z"
  }
}