CVE-2023-37277: Xwiki platform rest server XWiki Platform Vulnerable To Cross-site Vulnerability

CRITICAL
Advisory Identifier: GHSA-6xxr-648m-gch6
CVSS 9.6
CWE-352
Published
Advisory Summary

CVE-2023-37277 is a CRITICAL (CVSS 9.6) xwiki platform vulnerable to cross-site vulnerability (CWE-352: Cross-Site Request Forgery (CSRF)) affecting Xwiki platform rest server libraries in the Maven ecosystem. The issue involves xwiki platform vulnerable to cross-site request forgery (csrf) via the rest api. Remediation is available by upgrading affected packages to version 14.10.8, 15.2.

CVE-2023-37277 at a Glance

CVE Identifier CVE-2023-37277
GHSA Identifier GHSA-6xxr-648m-gch6
Severity CRITICAL
CVSS v3.1 Base Score 9.6
CWE Classification CWE-352: Cross-Site Request Forgery (CSRF)
Affected Product Xwiki platform rest server
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 9.6

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

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

How to Fix CVE-2023-37277

To remediate this vulnerability, upgrade all affected Xwiki platform rest server 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.xwiki.platform:xwiki-platform-rest-server fixed: 14.10.8
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-rest-server</artifactId>
    <version>14.10.8</version>
</dependency>
com.xpn.xwiki.platform:xwiki-core-rest-server fixed: 14.10.8
<dependency>
    <groupId>com.xpn.xwiki.platform</groupId>
    <artifactId>xwiki-core-rest-server</artifactId>
    <version>14.10.8</version>
</dependency>
com.xpn.xwiki.platform:xwiki-rest fixed: 14.10.8
<dependency>
    <groupId>com.xpn.xwiki.platform</groupId>
    <artifactId>xwiki-rest</artifactId>
    <version>14.10.8</version>
</dependency>
org.xwiki.platform:xwiki-platform-rest-server fixed: 15.2
<dependency>
    <groupId>org.xwiki.platform</groupId>
    <artifactId>xwiki-platform-rest-server</artifactId>
    <version>15.2</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.xwiki.platform

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.xwiki.platform

Analyze the terminal output to locate any version of Xwiki platform rest server in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 14.10.8), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.xwiki.platform 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-352: Cross-Site Request Forgery (CSRF), where the web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor. In Xwiki platform rest server, 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 The REST API allows executing all actions via POST requests and accepts `text/plain`, `multipart/form-data` or `application/www-form-urlencoded` as content types which can be sent via regular HTML forms, thus allowing cross-site request forgery. With the interaction of a user with programming rights, this allows remote code execution through script macros and thus impacts the integrity, availability and confidentiality of the whole XWiki installation. For regular cookie-based authentication, the vulnerability is mitigated by SameSite cookie restrictions but as of March 2023, these are not enabled by default in Firefox and Safari. ### Patches The vulnerability has been patched in XWiki 14.10.8 and 15.2 by requiring a CSRF token header for certain request types that are susceptible to CSRF attacks. ### Workarounds It is possible to check for the `Origin` header in a reverse proxy to protect the REST endpoint from CSRF attacks, see [the Jira issue](https://jira.xwiki.org/browse/XWIKI-20135) for an example configuration. ### References * https://jira.xwiki.org/browse/XWIKI-20135 * https://github.com/xwiki/xwiki-platform/commit/4c175405faa0e62437df397811c7526dfc0fbae7

CVE-2023-37277 Affected Xwiki platform rest server Versions

4 component(s)
Fixed Versions:
14.10.815.2
Product / Package Ecosystem Affected Versions Fixed Version
org.xwiki.platform:xwiki-platform-rest-server
Maven
≥ 1.8
< 14.10.8
14.10.8
com.xpn.xwiki.platform:xwiki-core-rest-server
Maven
≥ 1.8
< 14.10.8
14.10.8
com.xpn.xwiki.platform:xwiki-rest
Maven
≥ 1.8
< 14.10.8
14.10.8
org.xwiki.platform:xwiki-platform-rest-server
Maven
≥ 15.0-rc-1
< 15.2
15.2

References

Frequently Asked Questions

What is CVE-2023-37277?
CVE-2023-37277 is a security vulnerability in Xwiki platform rest server involving XWiki Platform vulnerable to cross-site request forgery (CSRF) via the REST API under CWE-352: Cross-Site Request Forgery (CSRF).
Which Xwiki platform rest server versions are affected?
Affected versions include releases prior to 14.10.8, 15.2 across affected packages: org.xwiki.platform:xwiki-platform-rest-server, com.xpn.xwiki.platform:xwiki-core-rest-server, com.xpn.xwiki.platform:xwiki-rest.
What version fixes CVE-2023-37277?
Upgrading to 14.10.8, 15.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is xwiki-platform-rest-server affected?
Yes, org.xwiki.platform:xwiki-platform-rest-server is affected in releases prior to 14.10.8, 15.2. Upgrade your dependency to 14.10.8, 15.2 or later.
Is xwiki-core-rest-server affected?
Yes, com.xpn.xwiki.platform:xwiki-core-rest-server is affected in releases prior to 14.10.8. Upgrade your dependency to 14.10.8 or later.
What is the CVSS score of CVE-2023-37277?
CVE-2023-37277 has a CVSS v3.1 base score of 9.6 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2023-37277?
CVE-2023-37277 is classified under CWE-352: Cross-Site Request Forgery (CSRF) (The web application does not, or cannot, sufficiently verify whether a request was intentionally provided by the user who sent the request, which could have originated from an unauthorized actor.).
How can I check Maven dependencies for CVE-2023-37277?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.xwiki.platform'. 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-6xxr-648m-gch6",
  "modified" : "2023-07-10T21:53:12Z",
  "published" : "2023-07-10T21:53:12Z",
  "aliases" : [ "CVE-2023-37277" ],
  "summary" : "XWiki Platform vulnerable to cross-site request forgery (CSRF) via the REST API",
  "details" : "### Impact\n\nThe REST API allows executing all actions via POST requests and accepts `text/plain`, `multipart/form-data` or `application/www-form-urlencoded` as content types which can be sent via regular HTML forms, thus allowing cross-site request forgery. With the interaction of a user with programming rights, this allows remote code execution through script macros and thus impacts the integrity, availability and confidentiality of the whole XWiki installation.\n\nFor regular cookie-based authentication, the vulnerability is mitigated by SameSite cookie restrictions but as of March 2023, these are not enabled by default in Firefox and Safari.\n\n### Patches\nThe vulnerability has been patched in XWiki 14.10.8 and 15.2 by requiring a CSRF token header for certain request types that are susceptible to CSRF attacks.\n\n### Workarounds\n\nIt is possible to check for the `Origin` header in a reverse proxy to protect the REST endpoint from CSRF attacks, see [the Jira issue](https://jira.xwiki.org/browse/XWIKI-20135) for an example configuration.\n\n### References\n\n* https://jira.xwiki.org/browse/XWIKI-20135\n* https://github.com/xwiki/xwiki-platform/commit/4c175405faa0e62437df397811c7526dfc0fbae7\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-rest-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.8"
      }, {
        "fixed" : "14.10.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.xpn.xwiki.platform:xwiki-core-rest-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.8"
      }, {
        "fixed" : "14.10.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "com.xpn.xwiki.platform:xwiki-rest"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.8"
      }, {
        "fixed" : "14.10.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.xwiki.platform:xwiki-platform-rest-server"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "15.0-rc-1"
      }, {
        "fixed" : "15.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-6xxr-648m-gch6"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-37277"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/xwiki/xwiki-platform/commit/4c175405faa0e62437df397811c7526dfc0fbae7"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/xwiki/xwiki-platform"
  }, {
    "type" : "WEB",
    "url" : "https://jira.xwiki.org/browse/XWIKI-20135"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-352" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-07-10T21:53:12Z",
    "nvd_published_at" : "2023-07-10T17:15:09Z"
  }
}