MediaWiki up to 1.22.0 Upload XmlTypeCheck.php XSL File Stored cross site scripting

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.7$0-$5k0.00

Summaryinfo

A vulnerability was found in MediaWiki. It has been declared as problematic. Affected by this issue is some unknown functionality in the library includes/libs/XmlTypeCheck.php of the component Upload Handler. Executing a manipulation as part of XSL File can lead to cross site scripting (Stored). This vulnerability is handled as CVE-2013-6452. The attack can be executed remotely. Additionally, an exploit exists. It is recommended to upgrade the affected component.

Detailsinfo

A vulnerability has been found in MediaWiki (Content Management System) and classified as problematic. This vulnerability affects some unknown processing in the library includes/libs/XmlTypeCheck.php of the component Upload Handler. The manipulation as part of a XSL File leads to a cross site scripting vulnerability (Stored). The CWE definition for the vulnerability is CWE-79. The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. As an impact it is known to affect confidentiality, integrity, and availability. CVE summarizes:

Cross-site scripting (XSS) vulnerability in MediaWiki before 1.19.10, 1.2x before 1.21.4, and 1.22.x before 1.22.1 allows remote attackers to inject arbitrary web script or HTML via crafted XSL in an SVG file.

The weakness was released 11/25/2013 by Chris Davis (Bawolff) with RationalWiki as Bug 57550 as confirmed bug report (Bugzilla). The advisory is available at bugzilla.wikimedia.org. This vulnerability was named CVE-2013-6452 since 11/04/2013. The attack can be initiated remotely. No form of authentication is required for a successful exploitation. Successful exploitation requires user interaction by the victim. Technical details and also a public exploit are known. This vulnerability is assigned to T1059.007 by the MITRE ATT&CK project.

A public exploit has been developed by Chris Steipp in XSL/Javascript and been published immediately after the advisory. It is possible to download the exploit at bugzilla.wikimedia.org. It is declared as proof-of-concept. By approaching the search of inurl:includes/libs/XmlTypeCheck.php it is possible to find vulnerable targets with Google Hacking. The vulnerability scanner Nessus provides a plugin with the ID 73256 (Debian DSA-2891-1 : mediawiki, mediawiki-extensions Multiple Vulnerabilities), which helps to determine the existence of the flaw in a target environment. It is assigned to the family Debian Local Security Checks and running in the context l. The commercial vulnerability scanner Qualys is able to test this issue with plugin 12828 (MediaWiki Information Disclosure,Denial of Service and Multiple Cross-Site Scripting Vulnerabilities). The code used by the exploit is:

<?xml version="1.0"?>

<xsl:stylesheet version="1.0" 
		xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns="http://www.w3.org/2000/svg"
		>
  <xsl:output
      method="xml"
      indent="yes"
      standalone="no"
      doctype-public="-//W3C//DTD SVG 1.1//EN"
      doctype-system="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"
      media-type="image/svg" />
  
  <xsl:template match="svg">
    <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" >
      <rect x="10" y="10" width="{width}" 
	    height="{height}" fill="red" stroke="black"/>  
    <script type="text/javascript"><![CDATA[
      function dostuff() {
	var xmlhttp=new XMLHttpRequest();

	xmlhttp.open("GET","/w/api.php?action=query&meta=userinfo&format=txt",false);
	xmlhttp.send();
	alert(xmlhttp.responseText);
       }

       dostuff(); 
    ]]></script>
    </svg>
  </xsl:template>
  
</xsl:stylesheet>

Upgrading to version 1.22.1, 1.21.4 or 1.19.10 eliminates this vulnerability. Applying a patch is able to eliminate this problem. The bugfix is ready for download at bugzilla.wikimedia.org. The best possible mitigation is suggested to be upgrading to the latest version. A possible mitigation has been published 2 months after the disclosure of the vulnerability. The vulnerability will be addressed with the following lines of code:

public static function checkSvgPICallback( $target, $data ) {
   // Don't allow external stylesheets (bug 57550)
   if ( preg_match( '/xml-stylesheet/i', $target) ) {
      return true;
   }
   return false;
}

The vulnerability is also documented in the databases at X-Force (90600), Tenable (73256), SecurityFocus (BID 65003†), OSVDB (102348†) and Secunia (SA56413†). Additional details are provided at lists.wikimedia.org. Entries connected to this vulnerability are available at VDB-11233, VDB-12002, VDB-12011 and VDB-12012. Once again VulDB remains the best source for vulnerability data.

Productinfo

Type

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 6.3
VulDB Meta Temp Score: 5.7

VulDB Base Score: 6.3
VulDB Temp Score: 5.7
VulDB Vector: 🔍
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍

NVD Base Score: 🔍

Exploitinginfo

Name: Stored
Class: Cross site scripting / Stored
CWE: CWE-79 / CWE-94 / CWE-74
CAPEC: 🔍
ATT&CK: 🔍

Physical: No
Local: No
Remote: Yes

Availability: 🔍
Access: Public
Status: Proof-of-Concept
Author: Chris Steipp
Programming Language: 🔍
Download: 🔍
Google Hack: 🔍

EPSS Score: 🔍
EPSS Percentile: 🔍

Price Prediction: 🔍
Current Price Estimation: 🔍

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 73256
Nessus Name: Debian DSA-2891-1 : mediawiki, mediawiki-extensions Multiple Vulnerabilities
Nessus File: 🔍
Nessus Risk: 🔍
Nessus Family: 🔍
Nessus Context: 🔍

OpenVAS ID: 702891
OpenVAS Name: Debian Security Advisory DSA 2891-1 (mediawiki, mediawiki-extensions - security update
OpenVAS File: 🔍
OpenVAS Family: 🔍

Qualys ID: 🔍
Qualys Name: 🔍

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

Reaction Time: 🔍
0-Day Time: 🔍
Exposure Time: 🔍
Exploit Delay Time: 🔍

Upgrade: MediaWiki 1.22.1/1.21.4/1.19.10
Patch: bugzilla.wikimedia.org

Timelineinfo

11/04/2013 🔍
11/25/2013 +21 days 🔍
11/25/2013 +0 days 🔍
01/13/2014 +49 days 🔍
01/13/2014 +0 days 🔍
01/14/2014 +0 days 🔍
01/19/2014 +5 days 🔍
01/24/2014 +4 days 🔍
03/31/2014 +65 days 🔍
05/12/2014 +42 days 🔍
05/15/2014 +2 days 🔍
09/21/2018 +1590 days 🔍

Sourcesinfo

Product: mediawiki.org

Advisory: Bug 57550
Researcher: Chris Davis (Bawolff)
Organization: RationalWiki
Status: Confirmed

CVE: CVE-2013-6452 (🔍)
GCVE (CVE): GCVE-0-2013-6452
GCVE (VulDB): GCVE-100-12046

OVAL: 🔍

X-Force: 90600 - MediaWiki CSS tags cross-site scripting, Medium Risk
SecurityFocus: 65003 - MediaWiki Multiple Security Vulnerabilities
Secunia: 56413 - MediaWiki Security Issues and Multiple Vulnerabilities, Less Critical
OSVDB: 102348
Vulnerability Center: 44515 - MediaWiki Multiple Versions Remote XSS via Crafted XSL in an SVG File, Medium

scip Labs: https://www.scip.ch/en/?labs.20161013
Misc.: 🔍
See also: 🔍

Entryinfo

Created: 01/24/2014 09:39
Updated: 09/21/2018 09:29
Changes: 01/24/2014 09:39 (93), 09/21/2018 09:29 (11)
Complete: 🔍
Cache ID: 216:510:103

Discussion

No comments yet. Languages: en.

Please log in to comment.

Might our Artificial Intelligence support you?

Check our Alexa App!