CVE-2023-40176 SXSS in the user profile via the timezone displayer

Critical 9.1 Published Updated

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.

PackageAffectedFixed in
org.xwiki.platform:xwiki-platform-web-templates MavenFrom 4.1-milestone-214.10.5
org.xwiki.platform:xwiki-platform-web-templates MavenFrom 4.1-milestone-214.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.

All Xwiki Xwiki vulnerabilities

Sources

Also known as GHSA-h8cm-3v5f-rgp6.

Is CVE-2023-40176 in your software?

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

Check your SBOMs for free