CVE-2023-40176 SXSS in the user profile via the timezone displayer
Attackers can inject malicious scripts via user timezone preferences, leading to data theft and privilege escalation for other users.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-40176?
CVE-2023-40176 is a critical cross-site scripting vulnerability in Xwiki Xwiki, published on 23 Aug 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. Any registered user can exploit a stored XSS through their user profile by setting the payload as the value of the time zone user preference. Even though the time zone is selected from a drop down (no free text value) it can still be set from JavaScript (using the browser developer tools) or by calling the save URL on the user profile with the right query string. Once the time zone is set it is displayed without escaping which means the payload gets executed for any user that visits the malicious user profile, allowing the attacker to steal information and even gain more access rights (escalation to programming rights). This issue is present since version 4.1M2 when the time zone user preference was introduced. The issue has been fixed in XWiki 14.10.5 and 15.1RC1.
Weakness: CWE-79
Which versions are affected by CVE-2023-40176?
2 open source packages ship an affected version, including org.xwiki.platform:xwiki-platform-web-templates. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
org.xwiki.platform:xwiki-platform-web-templates Maven | From 4.1-milestone-2 | 14.10.5 |
org.xwiki.platform:xwiki-platform-web-templates Maven | From 4.1-milestone-2 | 14.10.5 |
Products include Xwiki Xwiki.
How do I fix CVE-2023-40176?
Upgrade org.xwiki.platform:xwiki-platform-web-templates to 14.10.5 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2023-40176 being exploited?
There is no known exploitation of CVE-2023-40176 in the wild and no public exploit code.
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-h8cm-3v5f-rgp6.