CVE-2025-4760: Org.wso2.carbon.apimgt.api Cross-Site Scripting Vulnerability

MODERATE
Advisory Identifier: GHSA-cmjc-qp7j-xgwr
CVSS 4.8
CWE-79
Published
Advisory Summary

CVE-2025-4760 is a MODERATE (CVSS 4.8) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Org.wso2.carbon.apimgt.api libraries in the Maven ecosystem. The issue involves wso2 carbon-apimgt affected by an authenticated stored cross-site scripting (xss) vulnerability. Remediation is available by upgrading affected packages to version 9.31.117.

CVE-2025-4760 at a Glance

CVE Identifier CVE-2025-4760
GHSA Identifier GHSA-cmjc-qp7j-xgwr
Severity MODERATE
CVSS v3.1 Base Score 4.8
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product Org.wso2.carbon.apimgt.api
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 4.8

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required High (PR:H)
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-4760

To remediate this vulnerability, upgrade all affected Org.wso2.carbon.apimgt.api dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.api fixed: 9.31.117
<dependency>
    <groupId>org.wso2.carbon.apimgt</groupId>
    <artifactId>org.wso2.carbon.apimgt.api</artifactId>
    <version>9.31.117</version>
</dependency>
org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.rest.api.publisher.v1 fixed: 9.31.117
<dependency>
    <groupId>org.wso2.carbon.apimgt</groupId>
    <artifactId>org.wso2.carbon.apimgt.rest.api.publisher.v1</artifactId>
    <version>9.31.117</version>
</dependency>
Verify Direct and Transitive Dependencies

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

mvn dependency:tree -Dincludes=org.wso2.carbon.apimgt

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-4760, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.wso2.carbon.apimgt

Analyze the terminal output to locate any version of Org.wso2.carbon.apimgt.api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 9.31.117), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.wso2.carbon.apimgt command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Org.wso2.carbon.apimgt.api, 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

An authenticated stored Cross-Site Scripting (XSS) vulnerability exists in WSO2 API Manager components (`carbon-apimgt`) due to insufficient validation of user-supplied input during API document upload in the Publisher portal. A user with publisher privileges can upload a crafted API document whose contents are later rendered in the UI for other users, leading to attacker-controlled script execution. Likely outcomes include redirection to malicious sites, unauthorized UI modifications, or exfiltration of data accessible to the browser; session hijacking is mitigated by the use of `HttpOnly` session cookies. To remediate, update to version 9.31.117 or above.

CVE-2025-4760 Affected Org.wso2.carbon.apimgt.api Versions

2 component(s)
Fixed Versions:
9.31.117
Product / Package Ecosystem Affected Versions Fixed Version
org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.api
Maven
< 9.31.117
9.31.117
org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.rest.api.publisher.v1
Maven
< 9.31.117
9.31.117

References

Frequently Asked Questions

What is CVE-2025-4760?
CVE-2025-4760 is a security vulnerability in Org.wso2.carbon.apimgt.api involving WSO2 carbon-apimgt affected by an authenticated stored cross-site scripting (XSS) vulnerability under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which Org.wso2.carbon.apimgt.api versions are affected?
Affected versions include releases prior to 9.31.117 across affected packages: org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.api, org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.rest.api.publisher.v1.
What version fixes CVE-2025-4760?
Upgrading to 9.31.117 (or the latest patched release for your respective branch) resolves the vulnerability.
Is org.wso2.carbon.apimgt.api affected?
Yes, org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.api is affected in releases prior to 9.31.117. Upgrade your dependency to 9.31.117 or later.
Is org.wso2.carbon.apimgt.rest.api.publisher.v1 affected?
Yes, org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.rest.api.publisher.v1 is affected in releases prior to 9.31.117. Upgrade your dependency to 9.31.117 or later.
What is the CVSS score of CVE-2025-4760?
CVE-2025-4760 has a CVSS v3.1 base score of 4.8 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2025-4760?
CVE-2025-4760 is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.).
How can I check Maven dependencies for CVE-2025-4760?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.wso2.carbon.apimgt'. 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-cmjc-qp7j-xgwr",
  "modified" : "2025-09-27T03:38:34Z",
  "published" : "2025-09-23T15:31:09Z",
  "aliases" : [ "CVE-2025-4760" ],
  "summary" : "WSO2 carbon-apimgt affected by an authenticated stored cross-site scripting (XSS) vulnerability",
  "details" : "An authenticated stored Cross-Site Scripting (XSS) vulnerability exists in WSO2 API Manager components (`carbon-apimgt`) due to insufficient validation of user-supplied input during API document upload in the Publisher portal.\n\nA user with publisher privileges can upload a crafted API document whose contents are later rendered in the UI for other users, leading to attacker-controlled script execution. Likely outcomes include redirection to malicious sites, unauthorized UI modifications, or exfiltration of data accessible to the browser; session hijacking is mitigated by the use of `HttpOnly` session cookies.\n\nTo remediate, update to version 9.31.117 or above.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.api"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.31.117"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.wso2.carbon.apimgt:org.wso2.carbon.apimgt.rest.api.publisher.v1"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "9.31.117"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-4760"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wso2/carbon-apimgt/pull/13099"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/wso2/carbon-apimgt/commit/1b3496c072ec68aaaf726996e2caa76f07c1adca"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/wso2/carbon-apimgt"
  }, {
    "type" : "WEB",
    "url" : "https://mvnrepository.com/artifact/org.wso2.carbon.apimgt/org.wso2.carbon.apimgt.api/9.31.117"
  }, {
    "type" : "WEB",
    "url" : "https://security.docs.wso2.com/en/latest/security-announcements/security-advisories/2025/WSO2-2025-4104"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-09-23T17:38:55Z",
    "nvd_published_at" : "2025-09-23T15:15:31Z"
  }
}