MediaWiki up to 1.22.0 Upload XmlTypeCheck.php XSL File Stored cross site scripting
| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 5.7 | $0-$5k | 0.00 |
Summary
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.
Details
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.
Product
Type
Name
Version
License
Website
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔍VulDB Reliability: 🔍
CVSSv3
VulDB Meta Base Score: 6.3VulDB Meta Temp Score: 5.7
VulDB Base Score: 6.3
VulDB Temp Score: 5.7
VulDB Vector: 🔍
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔍
VulDB Temp Score: 🔍
VulDB Reliability: 🔍
NVD Base Score: 🔍
Exploiting
Name: StoredClass: 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-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
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 Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
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
Timeline
11/04/2013 🔍11/25/2013 🔍
11/25/2013 🔍
01/13/2014 🔍
01/13/2014 🔍
01/14/2014 🔍
01/19/2014 🔍
01/24/2014 🔍
03/31/2014 🔍
05/12/2014 🔍
05/15/2014 🔍
09/21/2018 🔍
Sources
Product: mediawiki.orgAdvisory: 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: 🔍
Entry
Created: 01/24/2014 09:39Updated: 09/21/2018 09:29
Changes: 01/24/2014 09:39 (93), 09/21/2018 09:29 (11)
Complete: 🔍
Cache ID: 216:510:103
No comments yet. Languages: en.
Please log in to comment.