What’s Vulnerable › Vulnerabilities
CVE-2021-40346
- Severity: high (CVSS 7.5 v3.1)
- Exploited in the wild: not listed in CISA KEV
- EPSS: 58.8% probability of exploitation in the next 30 days
- Public exploit or detection template: yes
- Published: 2021-09-08 · updated 2026-06-17
- Weakness: CWE-190
Description
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.
Affected products
- Debian Linux: 11.0
- Fedoraproject Fedora: 33, 34
- HAProxy: from 2.0.0 before 2.0.25; from 2.2.0 before 2.2.17; from 2.3.0 before 2.3.14; from 2.4.0 before 2.4.4; 2.5-dev0, 2.5-dev1, 2.5-dev2, 2.5-dev3, 2.5-dev4, 2.5-dev5 (+1) — fixed in 2.0.25, 2.2.17, 2.3.14, 2.4.4
How to fix
Upgrade to a fixed version: HAProxy 2.0.25, 2.2.17, 2.3.14, 2.4.4. Check the vendor advisory for mitigations.
References
- https://git.haproxy.org/?p=haproxy.git
- https://github.com/haproxy/haproxy/commit/3b69886f7dcc3cfb3d166309018e6cfec9ce2c95
- https://jfrog.com/blog/critical-vulnerability-in-haproxy-cve-2021-40346-integer-overflow-enables-http-smuggling/
- https://lists.apache.org/thread.html/r284567dd7523f5823e2ce995f787ccd37b1cc4108779c50a97c79120%40%3Cdev.cloudstack.apache.org%3E
- https://lists.apache.org/thread.html/r8a58fd7a29808e5d27ee56877745e58dc4bb041b9af94601554e2a5a%40%3Cdev.cloudstack.apache.org%3E
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/A7V2IYO22LWVBGUNZWVKNTMDV4KINLFO/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/MXTSBY2TEAXWZVFQM3CXHJFRONX7PEMN/
- https://www.debian.org/security/2021/dsa-4968
- https://www.mail-archive.com/haproxy%40formilux.org
- https://www.mail-archive.com/haproxy%40formilux.org/msg41114.html
- https://git.haproxy.org/?p=haproxy.git
- https://github.com/haproxy/haproxy/commit/3b69886f7dcc3cfb3d166309018e6cfec9ce2c95
Get alerted when CVE-2021-40346 or the next vulnerability affects your stack