CVE-2023-40177 XWiki Platform privilege escalation (PR) from account through AWM content fields
Registered users can escalate privileges and execute arbitrary scripts by exploiting the AppWithinMinutes content field in their user profile.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2023-40177?
CVE-2023-40177 is a critical vulnerability in Xwiki Xwiki, published on 23 Aug 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Any registered user can use the content field of their user profile page to execute arbitrary scripts with programming rights, thus effectively performing rights escalation. This issue is present since version 4.3M2 when AppWithinMinutes Application added support for the Content field, allowing any wiki page (including the user profile page) to use its content as an AWM Content field, which has a custom displayer that executes the content with the rights of the ``AppWithinMinutes.Content`` author, rather than the rights of the content author. The vulnerability has been fixed in XWiki 14.10.5 and 15.1RC1. The fix is in the content of the AppWithinMinutes.Content page that defines the custom displayer. By using the ``display`` script service to render the content we make sure that the proper author is used for access rights checks.
Which versions are affected by CVE-2023-40177?
2 open source packages ship an affected version, including org.xwiki.platform:xwiki-platform-appwithinminutes-ui. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.xwiki.platform:xwiki-platform-appwithinminutes-ui Maven | From 4.3-milestone-2 | 14.10.5 |
org.xwiki.platform:xwiki-platform-appwithinminutes-ui Maven | From 4.3-milestone-2 | 14.10.5 |
Products include Xwiki Xwiki.
How do I fix CVE-2023-40177?
Upgrade org.xwiki.platform:xwiki-platform-appwithinminutes-ui to 14.10.5 or later.
Is CVE-2023-40177 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-40177 exists.
Other vulnerabilities in Xwiki Xwiki
- CVE-2025-24893 XWiki Platform Eval Injection
- CVE-2025-53836 XWiki Rendering is vulnerable to RCE attacks when processing nested macros
- CVE-2024-55662 XWiki allows remote code execution through the extension sheet
- CVE-2024-55877 XWiki allows remote code execution from account through macro descriptions and XWiki.XWikiSyntaxMacrosList
- CVE-2024-37901 XWiki Platform vulnerable to remote code execution from account via SearchSuggestConfigSheet
Sources
Also known as GHSA-5mf8-v43w-mfxp.