If you are using HAProxy 2.0 or newer, it is important that you update to the latest version. A vulnerability was found that makes it possible for an attacker to bypass the check for a duplicate HTTP Content-Length header, permitting a request smuggling attack or a response-splitting attack. Our analysis confirmed that the duplication is achieved by making use of the memory layout of HAProxy’s internal representation of an HTTP message to slip a select character from the header’s name to its value. Due to the difficulty in executing such an attack, the risk is low.
Affected Versions and Remediation
The following section lists the affected versions and fixed version. We recommend that you upgrade if you are using any of these.
|Affected Version||Fixed Version|
|HAProxy Enterprise 2.0r1||2.0r1-235.1230|
|HAProxy Enterprise 2.1r1||2.1r1-238.625|
|HAProxy Enterprise 2.2r1||2.2r1-241.505|
|HAProxy Enterprise 2.3r1||2.3r1-242.345|
|HAProxy Kubernetes Ingress Controller 1.6||1.6.7|
|HAProxy Enterprise Kubernetes Ingress Controller 1.6||1.6.7|
|HAProxy ALOHA 11.5||11.5.13|
|HAProxy ALOHA 12.5||12.5.5|
|HAProxy ALOHA 13.0||13.0.7|
If you are not able to update right away, you can apply the following rules to mitigate the issues. These should be added to your frontend.
These lines reject requests or responses that have more than one Content-Length header.