ADVISORIES

GitHub Advisory Database

GHSA-c32m-27pj-4xcj

XWiki's required right warnings for macros are incomplete

Details

Impact

When editing content that contains "dangerous" macros like malicious script macros that were authored by a user with fewer rights, XWiki warns about the execution of these macros since XWiki 15.9RC1. These required rights analyzers that trigger these warnings are incomplete, allowing an attacker to hide malicious content. For most macros, the existing analyzers don't consider non-lowercase parameters. Further, most macro parameters that can contain XWiki syntax like titles of information boxes weren't analyzed at all. Similarly, the "source" parameters of the content and context macro weren't anylzed even though they could contain arbitrary XWiki syntax. In the worst case, this could allow a malicious to add malicious script macros including Groovy or Python macros to a page that are then executed after another user with programming righs edits the page, thus allowing remote code execution.

Patches

The required rights analyzers have been made more robust and extended to cover those cases in XWiki 16.4.7, 16.10.3 and 17.0.0.

Workarounds

We're not aware of any workarounds except for being careful when editing content authored by untrusted users.

References

  • https://jira.xwiki.org/browse/XWIKI-22763
  • https://jira.xwiki.org/browse/XWIKI-22759
  • https://jira.xwiki.org/browse/XWIKI-22758
  • https://jira.xwiki.org/browse/XWIKI-22799
  • https://github.com/xwiki/xwiki-platform/commit/abdcefc0db27035b67329add836fd683e0cf92b8
  • https://github.com/xwiki/xwiki-platform/commit/cc74dc802efe0e2d3fa2ba3355dbadc51c5fd8c7
  • https://github.com/xwiki/xwiki-platform/commit/0a705e8e253cb871b804e25c53b2bde879c886bd
  • https://github.com/xwiki/xwiki-platform/commit/3d451e957fe2b14459e9ac64172b4a0e4c46971c

Affected packages

EcosystemPackageAffected versions
Mavenorg.xwiki.platform:xwiki-platform-rendering-xwiki
From 15.9-rc-1 before 16.4.7 (fixed in 16.4.7)
Mavenorg.xwiki.platform:xwiki-platform-rendering-xwiki
From 16.5.0-rc-1 before 16.10.3 (fixed in 16.10.3)
Mavenorg.xwiki.platform:xwiki-platform-rendering-xwiki
From 17.0.0-rc-1 before 17.0.0 (fixed in 17.0.0)
Mavenorg.xwiki.platform:xwiki-platform-rendering-macro-cache
From 15.9-rc-1 before 16.4.7 (fixed in 16.4.7)
Mavenorg.xwiki.platform:xwiki-platform-rendering-macro-cache
From 16.5.0-rc-1 before 16.10.3 (fixed in 16.10.3)
Mavenorg.xwiki.platform:xwiki-platform-rendering-macro-cache
From 17.0.0-rc-1 before 17.0.0 (fixed in 17.0.0)
Mavenorg.xwiki.platform:xwiki-platform-security-requiredrights-default
From 15.9-rc-1 before 16.4.7 (fixed in 16.4.7)
Mavenorg.xwiki.platform:xwiki-platform-security-requiredrights-default
From 16.5.0-rc-1 before 16.10.3 (fixed in 16.10.3)
Mavenorg.xwiki.platform:xwiki-platform-security-requiredrights-default
From 17.0.0-rc-1 before 17.0.0 (fixed in 17.0.0)
Mavenorg.xwiki.platform:xwiki-platform-rendering-macro-context
From 15.9-rc-1 before 16.4.7 (fixed in 16.4.7)
Mavenorg.xwiki.platform:xwiki-platform-rendering-macro-context
From 16.5.0-rc-1 before 16.10.3 (fixed in 16.10.3)
Mavenorg.xwiki.platform:xwiki-platform-rendering-macro-context
From 17.0.0-rc-1 before 17.0.0 (fixed in 17.0.0)

References