Amazon Linux 2 : haproxy2 (ALASHAPROXY2-2023-005)

high Nessus Plugin ID 181935


The remote Amazon Linux 2 host is missing a security update.


The version of haproxy2 installed on the remote host is prior to 2.2.17-1. It is, therefore, affected by multiple vulnerabilities as referenced in the ALAS2HAPROXY2-2023-005 advisory.

- An issue was discovered in HAProxy 2.2 before 2.2.16, 2.3 before 2.3.13, and 2.4 before 2.4.3. It does not ensure that the scheme and path portions of a URI have the expected characters. For example, the authority field (as observed on a target HTTP/2 server) might differ from what the routing rules were intended to achieve. (CVE-2021-39240)

- An issue was discovered in HAProxy 2.0 before 2.0.24, 2.2 before 2.2.16, 2.3 before 2.3.13, and 2.4 before 2.4.3. An HTTP method name may contain a space followed by the name of a protected resource. It is possible that a server would interpret this as a request for that protected resource, such as in the GET /admin? HTTP/1.1 /static/images HTTP/1.1 example. (CVE-2021-39241)

- An issue was discovered in HAProxy 2.2 before 2.2.16, 2.3 before 2.3.13, and 2.4 before 2.4.3. It can lead to a situation with an attacker-controlled HTTP Host header, because a mismatch between Host and authority is mishandled. (CVE-2021-39242)

- An integer overflow exists in HAProxy 2.0 through 2.5 in htx_add_header that can be exploited to perform an HTTP request smuggling attack, allowing an attacker to bypass all configured http-request HAProxy ACLs and possibly other ACLs. (CVE-2021-40346)

Note that Nessus has not tested for these issues but has instead relied only on the application's self-reported version number.


Run 'yum update haproxy2' to update your system.

See Also

Plugin Details

Severity: High

ID: 181935

File Name: al2_ALASHAPROXY2-2023-005.nasl

Version: 1.1

Type: local

Agent: unix

Published: 9/27/2023

Updated: 9/28/2023

Supported Sensors: Agentless Assessment, Frictionless Assessment Agent, Frictionless Assessment AWS, Nessus Agent, Nessus

Risk Information


Risk Factor: Medium

Score: 4.4


Risk Factor: Medium

Base Score: 5

Temporal Score: 3.9

Vector: CVSS2#AV:N/AC:L/Au:N/C:N/I:P/A:N

CVSS Score Source: CVE-2021-40346


Risk Factor: High

Base Score: 7.5

Temporal Score: 6.7

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Temporal Vector: CVSS:3.0/E:P/RL:O/RC:C

Vulnerability Information

CPE: p-cpe:/a:amazon:linux:haproxy2, p-cpe:/a:amazon:linux:haproxy2-debuginfo, cpe:/o:amazon:linux:2

Required KB Items: Host/local_checks_enabled, Host/AmazonLinux/release, Host/AmazonLinux/rpm-list

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 8/21/2023

Vulnerability Publication Date: 8/17/2021

Reference Information

CVE: CVE-2021-39240, CVE-2021-39241, CVE-2021-39242, CVE-2021-40346

IAVB: 2021-B-0056