Skip to content

Velocity execution without script right through tree macro

High severity GitHub Reviewed Published Dec 19, 2023 in xwiki/xwiki-platform • Updated Dec 21, 2023

Package

maven org.xwiki.platform:xwiki-platform-index-tree-macro (Maven)

Affected versions

>= 8.3-rc-1, < 14.10.7
>= 15.0-rc-1, < 15.2-rc-1

Patched versions

14.10.7
15.2-rc-1

Description

Impact

It's possible to execute a Velocity script without script right through the document tree.

To reproduce:

  • As a user without script right, create a document, e.g., named Nasty Title
  • Set the document's title to $request.requestURI
  • Click "Save & View"
  • Reload the page in the browser

The navigation panel displays a document named with the current URL, showing that the Velocity code has been executed even though the user doesn't have script right.

Patches

This has been patched in XWiki 14.10.7 and 15.2RC1.

Workarounds

A possible workaround is to:

  • modify the page XWiki.DocumentTreeMacros
  • search for the code #set ($discard = $translatedDocument.setTitle($translatedDocument.title))
  • modify it into #set ($discard = $translatedDocument.setcomment(''))

References

For more information

If you have any questions or comments about this advisory:

References

@tmortagne tmortagne published to xwiki/xwiki-platform Dec 19, 2023
Published to the GitHub Advisory Database Dec 19, 2023
Reviewed Dec 19, 2023
Published by the National Vulnerability Database Dec 21, 2023
Last updated Dec 21, 2023

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
Low

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L

EPSS score

0.086%
(38th percentile)

Weaknesses

CVE ID

CVE-2023-50732

GHSA ID

GHSA-p5f8-qf24-24cj

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.