HTTP Header Injection, Set Cookie, CRLF, CWE-113

CWE-113: Improper Neutralization of CRLF Sequences in HTTP Headers ('HTTP Response Splitting')

Report generated by CloudScan Vulnerability Crawler at Fri Feb 18 10:14:16 CST 2011.


The DORK Report

Loading

1. HTTP header injection



1. HTTP header injection

Summary

Severity:   High
Confidence:   Certain
Host:   http://tacoda.at.atwola.com
Path:   /rtx/r.js

Issue detail

The value of the si request parameter is copied into the Set-Cookie response header. The payload 15802%0d%0a6fe09aee5f0 was submitted in the si parameter. This caused a response containing an injected HTTP header.

Issue background

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.

Request

GET /rtx/r.js?cmd=DWT&si=15802%0d%0a6fe09aee5f0&pi=L&xs=3&pu=http%253A//an.tacoda.net/an/18139/bizo_multi.htm%253Fpid%253D224%2526u%253Dind%253Aind_bizser%2526ifu%253Dhttp%25253A//js.bizographics.com/support/partner.html%25253Fpid%25253D224%252526u%25253Dind%25253Aind_bizser&v=5.5&cb=4708&tid= HTTP/1.1
Host: tacoda.at.atwola.com
Proxy-Connection: keep-alive
Referer: http://an.tacoda.net/an/18139/bizo_multi.htm?pid=224&u=ind:ind_bizser
Accept: */*
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.98 Safari/534.13
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: Fri, 18 Feb 2011 12:47:47 GMT
Server: Apache/1.3.37 (Unix) mod_perl/1.29
P3P: policyref="http://www.tacoda.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELa IND PHY ONL UNI COM NAV DEM"
P3P: policyref="http://www.tacoda.com/w3c/p3p.xml", CP="NON DSP COR NID CURa ADMo DEVo TAIo PSAo PSDo OUR DELa IND PHY ONL UNI COM NAV DEM"
Cache-Control: max-age=900
Expires: Fri, 18 Feb 2011 13:02:47 GMT
Set-Cookie: ATTACID=a3Z0aWQ9MTZsc3FqajBjYzJqbWc=; path=/; expires=Mon, 13-Feb-12 12:47:47 GMT; domain=.at.atwola.com
Set-Cookie: ANRTT=53615^1^1298638067; path=/; expires=Fri, 25-Feb-11 12:47:47 GMT; domain=tacoda.at.atwola.com
Set-Cookie: Tsid=0^1298033267^1298035067|15802
6fe09aee5f0
^1298033267^1298035067; path=/; expires=Fri, 18-Feb-11 13:17:47 GMT; domain=tacoda.at.atwola.com
Set-Cookie: TData=99999|^|#|53615; expires=Mon, 13-Feb-12 12:47:47 GMT; path=/; domain=tacoda.at.atwola.com
Set-Cookie: Anxd=x; expires=Fri, 18-Feb-11 18:47:47 GMT; path=/; domain=tacoda.at.atwola.com
Set-Cookie: N=2:4bb61a8cd423e3c48ff8843b87a5babd; expires=Mon, 13-Feb-12 12:47:47 GMT; path=/; domain=tacoda.at.atwola.com
Set-Cookie: ATTAC=a3ZzZWc9OTk5OTk6NTM2MTU=; expires=Mon, 13-Feb-12 12:47:47 GMT; path=/; domain=.at.atwola.com
ntCoent-Length: 110
Content-Type: application/x-javascript
Content-Length: 110

var ANUT=1;
var ANOO=0;
var ANSR=1;
var ANTID='16lsqjj0cc2jmg';
var ANSL='99999|^|#|53615';
ANRTXR();


Report generated by CloudScan Vulnerability Crawler at Fri Feb 18 10:14:16 CST 2011.