Lucene search

K
githubGitHub Advisory DatabaseGHSA-P5F8-QF24-24CJ
HistoryDec 19, 2023 - 9:39 p.m.

Velocity execution without script right through tree macro

2023-12-1921:39:31
CWE-863
GitHub Advisory Database
github.com
1
velocity script execution
document tree vulnerability
xwiki patch.

8.3 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L

7.3 High

AI Score

Confidence

High

0.001 Low

EPSS

Percentile

39.7%

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:

Affected configurations

Vulners
Node
org.xwiki.platform\xwikiMatchplatform
OR
org.xwiki.platform\xwikiMatchplatform
OR
org.xwiki.platform\xwikiMatchplatform

8.3 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

CHANGED

Confidentiality Impact

LOW

Integrity Impact

LOW

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:L

7.3 High

AI Score

Confidence

High

0.001 Low

EPSS

Percentile

39.7%

Related for GHSA-P5F8-QF24-24CJ