ghsa-93gh-jgjj-r929
Vulnerability from github
Published
2023-10-25 21:14
Modified
2023-10-27 21:01
Severity ?
Summary
XWiki Platform vulnerable to XSS with edit right in the create document form for existing pages
Details

Impact

When trying to create a document that already exists, XWiki displays an error message in the form for creating it. Due to missing escaping, this error message is vulnerable to raw HTML injection and thus XSS. The injected code is the document reference of the existing document so this requires that the attacker first creates a non-empty document whose name contains the attack code.

To reproduce, the following steps can be used:

  1. Go to <xwiki-host>/xwiki/bin/create/Main/WebHome?parent=&templateprovider=&spaceReference=&name=%3Cimg%20onerror=%22alert(1)%22%20src=%22test%22 where <xwiki-host> is the URL of your XWiki installation.
  2. Create the page and add some content.
  3. Go again to <xwiki-host>/xwiki/bin/create/Main/WebHome?parent=&templateprovider=&spaceReference=&name=%3Cimg%20onerror=%22alert(1)%22%20src=%22test%22 where <xwiki-host> is the URL of your XWiki installation.

If an alert with content "1" is displayed, the installation is vulnerable. This allows an attacker to execute arbitrary actions with the rights of the user opening the malicious link. Depending on the rights of the user, this may allow remote code execution and full read and write access to the whole XWiki installation.

Patches

This has been patched in XWiki 14.10.12 and 15.5RC1 by adding the appropriate escaping.

Workarounds

The vulnerable template file createinline.vm is part of XWiki's WAR and can be patched by manually applying the changes from the fix.

Show details on source website


{
  "affected": [
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.xwiki.platform:xwiki-platform-web-templates"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "14.10.12"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.xwiki.platform:xwiki-platform-web-templates"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "15.0-rc-1"
            },
            {
              "fixed": "15.5-rc-1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.xwiki.platform:xwiki-platform-web"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.1-milestone-2"
            },
            {
              "fixed": "13.4-rc-1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-45137"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-10-25T21:14:07Z",
    "nvd_published_at": "2023-10-25T21:15:10Z",
    "severity": "CRITICAL"
  },
  "details": "### Impact\nWhen trying to create a document that already exists, XWiki displays an error message in the form for creating it. Due to missing escaping, this error message is vulnerable to raw HTML injection and thus XSS. The injected code is the document reference of the existing document so this requires that the attacker first creates a non-empty document whose name contains the attack code. \n\nTo reproduce, the following steps can be used:\n\n1. Go to `\u003cxwiki-host\u003e/xwiki/bin/create/Main/WebHome?parent=\u0026templateprovider=\u0026spaceReference=\u0026name=%3Cimg%20onerror=%22alert(1)%22%20src=%22test%22` where `\u003cxwiki-host\u003e` is the URL of your XWiki installation.\n2. Create the page and add some content.\n3. Go again to `\u003cxwiki-host\u003e/xwiki/bin/create/Main/WebHome?parent=\u0026templateprovider=\u0026spaceReference=\u0026name=%3Cimg%20onerror=%22alert(1)%22%20src=%22test%22` where `\u003cxwiki-host\u003e` is the URL of your XWiki installation.\n\nIf an alert with content \"1\" is displayed, the installation is vulnerable. This allows an attacker to execute arbitrary actions with the rights of the user opening the malicious link. Depending on the rights of the user, this may allow remote code execution and full read and write access to the whole XWiki installation.\n\n### Patches\nThis has been patched in XWiki 14.10.12 and 15.5RC1 by adding the appropriate escaping.\n\n### Workarounds\nThe vulnerable template file createinline.vm is part of XWiki\u0027s WAR and can be patched by manually applying the [changes from the fix](https://github.com/xwiki/xwiki-platform/commit/ed8ec747967f8a16434806e727a57214a8843581#diff-c222148bddebe4ff7629350f4053b618504a4ab172e697938c8fddf7c1fc6bc8).",
  "id": "GHSA-93gh-jgjj-r929",
  "modified": "2023-10-27T21:01:16Z",
  "published": "2023-10-25T21:14:07Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-93gh-jgjj-r929"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-45137"
    },
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/commit/ed8ec747967f8a16434806e727a57214a8843581"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/xwiki/xwiki-platform"
    },
    {
      "type": "WEB",
      "url": "https://jira.xwiki.org/browse/XWIKI-20961"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "XWiki Platform vulnerable to XSS with edit right in the create document form for existing pages"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.