ghsa-gr82-8fj2-ggc3
Vulnerability from github
Published
2023-10-25 21:09
Modified
2023-11-03 15:36
Severity ?
Summary
XWiki Platform XSS vulnerability from account in the create page form via template provider
Details

Impact

An attacker can create a template provider on any document that is part of the wiki (could be the attacker's user profile) that contains malicious code. This code is executed when this template provider is selected during document creation which can be triggered by sending the user to a URL. For the attacker, the only requirement is to have an account as by default the own user profile is editable. 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.

For reproduction, the following steps can be used: 1. As a simple user with no script right, edit the user profile with the object editor and add an object of type "Template Provider Class". Set the name to "My Template", set template to any page on the wiki. In "Creation Restrictions", enter <img onerror="alert(1)" src="https://www.example.com". Accept the suggestion to add this string in the dropdown. Click "Save & View" 2. As any user with edit right, open <xwiki-host>/xwiki/bin/create/Main/WebHome?parent=&templateprovider=XWiki.<username>&name=foo&spaceReference=Bar, where <xwiki-host> is the URL of your XWiki installation and <username> is the username of the attacker.

If an alert is displayed, the installation is vulnerable.

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.

References

  • https://github.com/xwiki/xwiki-platform/commit/ba56fda175156dd35035f2b8c86cbd8ef1f90c2e
  • https://jira.xwiki.org/browse/XWIKI-20962
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-web-standard"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "2.4-milestone-2"
            },
            {
              "fixed": "3.1-milestone-1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Maven",
        "name": "org.xwiki.platform:xwiki-platform-web"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "3.1-milestone-1"
            },
            {
              "fixed": "13.4-rc-1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2023-45134"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-79"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2023-10-25T21:09:06Z",
    "nvd_published_at": "2023-10-25T20:15:11Z",
    "severity": "CRITICAL"
  },
  "details": "### Impact\nAn attacker can create a template provider on any document that is part of the wiki (could be the attacker\u0027s user profile) that contains malicious code. This code is executed when this template provider is selected during document creation which can be triggered by sending the user to a URL. For the attacker, the only requirement is to have an account as by default the own user profile is editable. 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\nFor reproduction, the following steps can be used:\n1. As a simple user with no script right, edit the user profile with the object editor and add an object of type \"Template Provider Class\". Set the name to \"My Template\", set template to any page on the wiki. In \"Creation Restrictions\", enter `\u003cimg onerror=\"alert(1)\" src=\"https://www.example.com\"`. Accept the suggestion to add this string in the dropdown. Click \"Save \u0026 View\"\n2. As any user with edit right, open `\u003cxwiki-host\u003e/xwiki/bin/create/Main/WebHome?parent=\u0026templateprovider=XWiki.\u003cusername\u003e\u0026name=foo\u0026spaceReference=Bar`, where `\u003cxwiki-host\u003e` is the URL of your XWiki installation and `\u003cusername\u003e` is the username of the attacker.\n\nIf an alert is displayed, the installation is vulnerable.\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/ba56fda175156dd35035f2b8c86cbd8ef1f90c2e#diff-c222148bddebe4ff7629350f4053b618504a4ab172e697938c8fddf7c1fc6bc8).\n\n### References\n* https://github.com/xwiki/xwiki-platform/commit/ba56fda175156dd35035f2b8c86cbd8ef1f90c2e\n* https://jira.xwiki.org/browse/XWIKI-20962",
  "id": "GHSA-gr82-8fj2-ggc3",
  "modified": "2023-11-03T15:36:47Z",
  "published": "2023-10-25T21:09:06Z",
  "references": [
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/security/advisories/GHSA-gr82-8fj2-ggc3"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2023-45134"
    },
    {
      "type": "WEB",
      "url": "https://github.com/xwiki/xwiki-platform/commit/ba56fda175156dd35035f2b8c86cbd8ef1f90c2e"
    },
    {
      "type": "PACKAGE",
      "url": "https://github.com/xwiki/xwiki-platform"
    },
    {
      "type": "WEB",
      "url": "https://jira.xwiki.org/browse/XWIKI-20962"
    }
  ],
  "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 XSS vulnerability from account in the create page form via template provider"
}


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.