Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') Affecting org.xwiki.commons:xwiki-commons-xml package, versions [14.6-rc-1,14.10.6)[15.0-rc-1,15.2-rc-1)


Severity

Recommended
0.0
critical
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of concept
EPSS
0.14% (51st percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JAVA-ORGXWIKICOMMONS-5747787
  • published30 Jun 2023
  • disclosed30 Jun 2023
  • creditUnknown

Introduced: 30 Jun 2023

CVE-2023-36471  (opens in a new tab)
CWE-74  (opens in a new tab)

How to fix?

Upgrade org.xwiki.commons:xwiki-commons-xml to version 14.10.6, 15.2-rc-1 or higher.

Overview

Affected versions of this package are vulnerable to Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection') due to allowing an attacker without script right to either create forms that can be used for phishing attacks or also in the context of a sheet. The attacker can add a malicious input that would allow remote code execution when it is submitted by an admin (the sheet is rendered as part of the edit form).

Note:

The attacker would need to ensure that the edit form looks plausible, though, which can be non-trivial as without script right the attacker cannot display the regular content of the document.

Workaround

An admin can manually disallow the tags by adding form, input, select, textarea, button to the configuration option xml.htmlElementSanitizer.forbidTags in the xwiki.properties configuration file.

PoC

{{html}}<input type="hidden" name="content" value="{{groovy}}println(&quot;Hello from Groovy!&quot;)" />{{/html}}

CVSS Scores

version 3.1