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

MODERATE
Advisory Identifier: GHSA-4xg4-54hm-9j77
CVSS 5.4
CWE-87 CWE-79
Published
Advisory Summary

CVE-2025-48495 is a MODERATE (CVSS 5.4) 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 has stored xss vulnerability in friendly name for api keys. Remediation is available by upgrading affected packages to version 0.0.0-20250530185940-65ddbc68fbfd.

CVE-2025-48495 at a Glance

CVE Identifier CVE-2025-48495
GHSA Identifier GHSA-4xg4-54hm-9j77
Severity MODERATE
CVSS v3.1 Base Score 5.4
CWE Classification CWE-87: Improper Neutralization of Alternate XSS Syntax
Affected Product Github.com/forceu/gokapi
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 5.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-48495

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-20250530185940-65ddbc68fbfd
Upgrade github.com/forceu/gokapi to 0.0.0-20250530185940-65ddbc68fbfd
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-48495, 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-20250530185940-65ddbc68fbfd), 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 By renaming the friendly name of an API key, an authenticated user could inject JS into the API key overview, which would also be executed when another user clicks on his API tab. 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 not open the API page if you suspect that another user might have injected code.

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

2 component(s)
Fixed Versions:
0.0.0-20250530185940-65ddbc68fbfd
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-20250530185940-65ddbc68fbfd
0.0.0-20250530185940-65ddbc68fbfd

References

Frequently Asked Questions

What is CVE-2025-48495?
CVE-2025-48495 is a security vulnerability in Github.com/forceu/gokapi involving Gokapi has stored XSS vulnerability in friendly name for API keys 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-20250530185940-65ddbc68fbfd across affected packages: github.com/forceu/gokapi.
What version fixes CVE-2025-48495?
Upgrading to 0.0.0-20250530185940-65ddbc68fbfd (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-20250530185940-65ddbc68fbfd. Upgrade your dependency to Latest secure release, 0.0.0-20250530185940-65ddbc68fbfd or later.
What is the CVSS score of CVE-2025-48495?
CVE-2025-48495 has a CVSS v3.1 base score of 5.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2025-48495?
CVE-2025-48495 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-48495?
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-4xg4-54hm-9j77",
  "modified" : "2025-08-26T20:10:48Z",
  "published" : "2025-06-03T06:27:28Z",
  "aliases" : [ "CVE-2025-48495" ],
  "summary" : "Gokapi has stored XSS vulnerability in friendly name for API keys",
  "details" : "### Impact\n\nBy renaming the friendly name of an API key, an authenticated user could inject JS into the API key overview, which would also be executed when another user clicks on his API tab.\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 not open the API page if you suspect that another user might have injected code.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
  }, {
    "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-20250530185940-65ddbc68fbfd"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Forceu/Gokapi/security/advisories/GHSA-4xg4-54hm-9j77"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48495"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Forceu/Gokapi/commit/65ddbc68fbfdf1c80cadb477f4bcbb7f2c4fdbf8"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Forceu/Gokapi"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2025-3736"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79", "CWE-87" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-06-03T06:27:28Z",
    "nvd_published_at" : "2025-06-02T12:15:25Z"
  }
}