CVE-2022-41937 (published 2022-11-22T01:15Z)

XWiki Platform is a generic wiki platform offering runtime services for applications built on top of it. The application allows anyone with view access to modify any page of the wiki by importing a crafted XAR package. The problem has been patched in XWiki 14.6RC1, 14.6 and 13.10.8. As a workaround, setting the right of the page Filter.WebHome and making sure only the main wiki administrators can view the application installed on main wiki or edit the page and apply the changed described in commit fb49b4f.

CVSS v3 base score: 8.1, HIGH (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N)

Weakness information:
cwe_id: CWE-862
cwe_name: Missing Authorization
description: The product does not perform an authorization check when an actor attempts to access a resource or perform an action.
extended_description: 
            Assuming a user with a given identity, authorization is the process of determining whether that user can access a given resource, based on the user's privileges and any permissions or other access-control specifications that apply to the resource.
            When access control checks are not applied, users are able to access data or perform actions that they should not be allowed to perform. This can lead to a wide range of problems, including information exposures, denial of service, and arbitrary code execution.
         
         

Fix information:
repo_url: https://github.com/xwiki/xwiki-platform
commit_details: repo_url: https://github.com/xwiki/xwiki-platform
author: Thomas Mortagne
author_date: 2022-06-30 17:49:37+02:00
msg: XWIKI-19758: Better control in Filter application
repository: repo_url: https://github.com/xwiki/xwiki-platform
repo_name: xwiki/xwiki-platform
description: The XWiki platform
repo_language: Java
owner: xwiki
file_changes: filename: WebHome.xml
change_type: ModificationType.MODIFY
diff: @@ -20,7 +20,7 @@
  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 -->
 
-<xwikidoc version="1.3" reference="Filter.WebHome" locale="">
+<xwikidoc version="1.5" reference="Filter.WebHome" locale="">
   <web>Filter</web>
   <name>WebHome</name>
   <language/>
@@ -36,9 +36,7 @@
   <minorEdit>false</minorEdit>
   <syntaxId>xwiki/2.1</syntaxId>
   <hidden>true</hidden>
-  <content>{{warning}}Filter module is still young and experimental and while exporting should be safe enough, importing can be more risky for the current instance.{{/warning}}
-
-{{include reference="FilterStreamDescriptorForm"/}}
+  <content>{{include reference="FilterStreamDescriptorForm"/}}
 
 {{velocity output="true"}}
 #set($input = $request.input)
@@ -77,6 +75,7 @@
 
 {{velocity}}
 #if ($request.convert)
+  #if ($services.security.authorization.hasAccess('programming', $context.userReference, $doc.documentReference))
   #if ($targetStandardOutput)
     $response.setContentType('application/octet-stream')
     $response.setHeader('Content-Disposition', 'attachment; filename=target');
@@ -107,6 +106,9 @@
       #end
     #end
   #end
+  #else
+    {{error}}You are not allowed to start a conversion.{{/error}}
+  #end
 #end
 {{/velocity}}
 
@@ -167,7 +169,11 @@
   &lt;/fieldset&gt;
 
   &lt;p&gt;
-  &lt;input class="button" type="submit" name="convert" value="Convert"/&gt;
+    #if ($services.security.authorization.hasAccess('programming', $context.userReference, $doc.documentReference))
+      &lt;input class="button" type="submit" name="convert" value="Convert"/&gt;
+    #else
+      &lt;input class="button" type="submit" name="convert" value="Convert" disabled title="You are not allowed to start a conversion."/&gt;
+    #end
   &lt;/p&gt;
 &lt;/div&gt;
 &lt;/form&gt;
@@ -189,8 +195,11 @@
       <validationScript/>
       <cache>
         <cache>0</cache>
+        <defaultValue>long</defaultValue>
         <disabled>0</disabled>
         <displayType>select</displayType>
+        <freeText>forbidden</freeText>
+        <largeStorage>0</largeStorage>
         <multiSelect>0</multiSelect>
         <name>cache</name>
         <number>5</number>
@@ -238,6 +247,8 @@
         <cache>0</cache>
         <disabled>0</disabled>
         <displayType>select</displayType>
+        <freeText>forbidden</freeText>
+        <largeStorage>0</largeStorage>
         <multiSelect>0</multiSelect>
         <name>use</name>
         <number>3</number>

programming_language: PHP