Squid Accept-Language Value DoS

April 5, 2013

The Squid Proxy server is an open source internet proxy and web caching application. It is utilized to speed up web servers by caching web pages and other network resources. Squid proxy supports numerous network protocols and is primarily ran on Unix based systems acting as an HTTP proxy. The HTTP protocol structure consists of an HTTP request, HTTP headers, and optional HTTP data. Headers are lines of human readable text, immediately following the HTTP request line. Headers are colon-separated name-value pairs terminated by the end of line character sequence 'rn'. The last header line is denoted by two such sequences. An example is shown:

 Content-Type: text/htmlnr Content-Length: 123nr nr [optional request data] 

One possible request header is the Accept-Language header, which indicates the set of natural languages accepted by the client. An example is shown:

 Accept-Language: en-US,en;q=0.8 

Each language can be given an associated quality value q which represents an estimate of the client's preference for the languages specified by the range. The expected default value for this field is "q=1".
A denial-of-service vulnerability exists in the Squid Proxy server during processing of malformed Accept-Language header values. The vulnerability is due to a design weakness during error page generation. When the affected header is present in the request, the vulnerable code does not account for all possible erroneous conditions when processing the value. If the value starts with the comma character, an internal memory pointer is thrown off track which causes the code to enter an infinite loop. Remote attackers can exploit this vulnerability by sending specially crafted, malicious HTTP requests to the target server. Successful exploitation of this vulnerability will result in a denial-of-service condition of the proxy server.

Dell SonicWall has released the following IPS signature to address this issue:

  • 9798 - Squid strHdrAcptLangGetItem DoS

The vulnerability has been assigned CVE-2013-1839 by mitre.
The vendor has released an advisory to address this issue.