CVE-2023-40177 XWiki Platform privilege escalation (PR) from account through AWM content fields

Critical 9.9 Published Updated

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.

Weakness: CWE-94, CWE-95

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.

PackageAffectedFixed in
org.xwiki.platform:xwiki-platform-appwithinminutes-ui MavenFrom 4.3-milestone-214.10.5
org.xwiki.platform:xwiki-platform-appwithinminutes-ui MavenFrom 4.3-milestone-214.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.

All Xwiki Xwiki vulnerabilities

Sources

Also known as GHSA-5mf8-v43w-mfxp.

Is CVE-2023-40177 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free