Skip to main content

CVE-2022-36097: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in xwiki xwiki-platform

Medium
Published: Thu Sep 08 2022 (09/08/2022, 20:35:11 UTC)
Source: CVE
Vendor/Project: xwiki
Product: xwiki-platform

Description

XWiki Platform Attachment UI provides a macro to easily upload and select attachments for XWiki Platform, a generic wiki platform. Starting with version 14.0-rc-1 and prior to 14.4-rc-1, it's possible to store JavaScript in an attachment name, which will be executed by anyone trying to move the corresponding attachment. This issue has been patched in XWiki 14.4-rc-1. As a workaround, one may copy `moveStep1.vm` to `webapp/xwiki/templates/moveStep1.vm` and replace vulnerable code with code from the patch.

AI-Powered Analysis

AILast updated: 06/21/2025, 23:36:07 UTC

Technical Analysis

CVE-2022-36097 is a cross-site scripting (XSS) vulnerability identified in the XWiki Platform, specifically within the Attachment UI macro used for uploading and selecting attachments. The vulnerability affects versions starting from 14.0-rc-1 up to, but not including, 14.4-rc-1. The core issue arises because the platform improperly neutralizes input during web page generation, allowing an attacker to embed malicious JavaScript code within an attachment's filename. When a user attempts to move such an attachment, the embedded script executes in the context of the victim's browser. This vulnerability is classified under CWE-79 (Improper Neutralization of Input During Web Page Generation) and CWE-80 (Improper Neutralization of Script-Related HTML Tags in a Web Page), both of which relate to inadequate input sanitization leading to XSS attacks. The vulnerability has been addressed in version 14.4-rc-1 of the XWiki Platform. As a temporary mitigation, administrators can replace the vulnerable template file moveStep1.vm with a patched version to prevent script execution. Notably, there are no known exploits in the wild at this time, but the vulnerability poses a risk due to the potential for executing arbitrary JavaScript in users' browsers, which can lead to session hijacking, credential theft, or unauthorized actions within the wiki platform.

Potential Impact

For European organizations utilizing the affected versions of XWiki Platform, this vulnerability can lead to significant security risks. Since XWiki is often used for internal documentation, collaboration, and knowledge management, exploitation of this XSS flaw could allow attackers to execute malicious scripts in the context of authenticated users. This can result in theft of session cookies, enabling unauthorized access, or manipulation of wiki content, undermining data integrity. Additionally, attackers could leverage this to conduct phishing attacks or deploy malware within the organization's network. The impact is particularly critical for organizations handling sensitive or regulated information, such as government agencies, financial institutions, and healthcare providers. The vulnerability could also disrupt availability if attackers inject scripts that cause denial-of-service conditions or corrupt wiki data. Although exploitation requires user interaction (moving the maliciously named attachment), the risk remains substantial in environments where multiple users have editing privileges or where attachments are frequently managed.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should prioritize upgrading the XWiki Platform to version 14.4-rc-1 or later, where the issue is fully patched. If immediate upgrading is not feasible, administrators should implement the recommended workaround by copying the patched moveStep1.vm template into the webapp/xwiki/templates directory, replacing the vulnerable code to neutralize malicious input. Additionally, organizations should enforce strict input validation and sanitization policies on attachment names and other user-generated content. Implementing Content Security Policy (CSP) headers can help limit the impact of any injected scripts by restricting script execution sources. Regularly auditing wiki attachments for suspicious filenames and monitoring user activities related to attachment management can help detect attempted exploitation. Finally, educating users about the risks of interacting with untrusted attachments and maintaining up-to-date backups of wiki data will aid in recovery if an attack occurs.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-07-15T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9849c4522896dcbf6943

Added to database: 5/21/2025, 9:09:29 AM

Last enriched: 6/21/2025, 11:36:07 PM

Last updated: 8/1/2025, 6:39:14 AM

Views: 17

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats