Skip to content
Fencer Vulns
high 7.5

CVE-2021-40346 in the critical feed json

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,…

published 2021-09-08 5 y ago modified 2026-09-08 2 mo ago also BIT-haproxy-2021-40346 , EUVD-2021-27525

cvss
7.5
version 3.1, NVD
cisa kev
Not listed
not in CISA's catalog
epss
58.8%
EPSS 58.8% chance of exploitation in 30 days, percentile 99.1%
public exploits
0
none known

Summary

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.

Patch / fix

  • bitnami haproxy 2.0.25, 2.2.17, 2.3.14, 2.4.4
  • haproxy haproxy 2.0.25, 2.2.17, 2.3.14, 2.4.4
  • haproxy Debian 14, Debian 13, Debian 12 2.2.16-3

debian advisories DEBIAN-CVE-2021-40346

  • haproxy Ubuntu 20.04 LTS 2.0.13-2ubuntu0.3
  • haproxy Ubuntu 22.04 LTS 2.2.9-2ubuntu2

ubuntu advisories UBUNTU-CVE-2021-40346

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

  • haproxy openshift 4.7 2.0.19-2.el7
  • haproxy openshift 4.7 2.0.19-2.el8
  • haproxy20 openshift 4.7 2.0.19-2.el7
  • haproxy20 openshift 4.7 2.0.19-2.el8
  • haproxy openshift 4.6 2.0.16-2.el7
  • haproxy openshift 4.6 2.0.16-4.el8
  • haproxy20 openshift 4.6 2.0.16-2.el7
  • haproxy20 openshift 4.6 2.0.16-4.el8

red hat advisories RHSA-2022:0114RHSA-2022:0024RHSA-2021:5208RHSA-2021:4118

  • haproxy SLE High Availability Extension 15 2.0.14-3.31.1
  • haproxy SLE High Availability Extension 15 SP1 2.0.14-8.23.1
  • haproxy SLE High Availability Extension 15 SP3, SLE High Availability Extension 15 SP2 2.0.14-11.11.1

suse advisories SUSE-SU-2021:3258-1SUSE-SU-2021:3257-1SUSE-SU-2021:2975-1

  • haproxy openSUSE Tumbleweed 2.4.4+git0.acb1d0bea-1.2
  • haproxy openSUSE Leap 15.2 2.0.14-lp152.2.6.1
  • haproxy openSUSE Leap 15.3 2.0.14-11.11.1

opensuse advisories openSUSE-SU-2024:10839-1openSUSE-SU-2021:1329-1openSUSE-SU-2021:2975-1

  • haproxy Arch Linux 2.4.4-1

arch linux advisories AVG-2343

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2021-40346 updated cvss 7.5

haproxy: request smuggling attack or response splitting via duplicate content-length header

  • Red Hat OpenShift Container Platform 3.11 haproxy, haproxy18
    affected: workaround, no fix planned “To mitigate this problem the following can be added to proxy config: http-request deny if { req.hdr_cnt(content-length) gt 1 } http-response deny if { res.hdr_cnt(content-length) gt 1 }”
  • Red Hat OpenShift Container Platform 4.6 haproxy 2.0.16-2.el7, haproxy 2.0.16-4.el8, haproxy20 2.0.16-2.el7, haproxy20 2.0.16-4.el8
    fixed: vendor fix “To mitigate this problem the following can be added to proxy config: http-request deny if { req.hdr_cnt(content-length) gt 1 } http-response deny if { res.hdr_cnt(content-length) gt 1 }” RHSA-2022:0024
  • Red Hat OpenShift Container Platform 4.7 haproxy 2.0.19-2.el7, haproxy 2.0.19-2.el8, haproxy20 2.0.19-2.el7, haproxy20 2.0.19-2.el8
    fixed: vendor fix “To mitigate this problem the following can be added to proxy config: http-request deny if { req.hdr_cnt(content-length) gt 1 } http-response deny if { res.hdr_cnt(content-length) gt 1 }” RHSA-2022:0114
  • Red Hat OpenShift Container Platform 4.8 haproxy 2.2.13-2.el7, haproxy 2.2.13-2.el8
    fixed: vendor fix “To mitigate this problem the following can be added to proxy config: http-request deny if { req.hdr_cnt(content-length) gt 1 } http-response deny if { res.hdr_cnt(content-length) gt 1 }” RHSA-2021:5208
  • Red Hat OpenShift Container Platform 4.9 haproxy 2.2.15-2.el8
    fixed: vendor fix “To mitigate this problem the following can be added to proxy config: http-request deny if { req.hdr_cnt(content-length) gt 1 } http-response deny if { res.hdr_cnt(content-length) gt 1 }” RHSA-2021:4118
  • Red Hat Enterprise Linux 6 haproxy Red Hat Enterprise Linux 7 haproxy Red Hat Enterprise Linux 8 haproxy Red Hat Enterprise Linux 9 haproxy Red Hat OpenShift Container Platform 4.6 openshift 4.6.0-202112092023.p0.g845f228.assembly.stream.el7, openshift 4.6.0-202112092023.p0.g845f228.assembly.stream.el8, openshift-hyperkube 4.6.0-202112092023.p0.g845f228.assembly.stream.el7, openshift-hyperkube 4.6.0-202112092023.p0.g845f228.assembly.stream.el8 Red Hat OpenShift Container Platform 4.7 cri-o 1.20.6-5.rhaos4.7.git8594c20.el7, cri-o 1.20.6-5.rhaos4.7.git8594c20.el8, openshift 4.7.0-202201082234.p0.ge880017.assembly.stream.el7, openshift 4.7.0-202201082234.p0.ge880017.assembly.stream.el8, openshift-kuryr 4.7.0-202201082234.p0.g72de60e.assembly.stream.el8, openshift-ansible 4.7.0-202201082234.p0.g4a5273a.assembly.stream.el7, +12 more
    +3 more products
    Red Hat OpenShift Container Platform 4.8 ostree 2020.7-6.el8_4, ostree-libs 2020.7-6.el8_4, ostree-grub2 2020.7-6.el8_4, openshift 4.8.0-202112150047.p0.gb4b4813.assembly.stream.el7, openshift 4.8.0-202112150047.p0.gb4b4813.assembly.stream.el8, openshift-kuryr 4.8.0-202112131630.p0.g839864c.assembly.stream.el8, +6 more Red Hat OpenShift Container Platform 4.9 cri-o 1.22.0-78.rhaos4.9.gitd745cab.el8, cri-o 1.22.0-91.rhaos4.9.gitd745cab.el7, openstack-ironic 18.1.1-0.20211019162143.e0437cd.el8, openstack-ironic-api 18.1.1-0.20211019162143.e0437cd.el8, python3-ironic-tests 18.1.1-0.20211019162143.e0437cd.el8, openstack-ironic-common 18.1.1-0.20211019162143.e0437cd.el8, +10 more Red Hat Software Collections rh-haproxy18-haproxy, rh-haproxy18-haproxy-syspaths
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

Exploit prediction

58.83% chance of exploitation in the next 30 days, higher than 99.1% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • jfrog.com https://jfrog.com/blog/critical-vulnerability-in-haproxy-cve-2021-40346-integer-overflow-enables-http-smuggling/ referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
NVD 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
NVD 2.0 5.0 AV:N/AC:L/Au:N/C:N/I:P/A:N
OSV 3.1 7.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

Affected packages

ecosystem package affected fixed in
bitnami haproxy
>=2.0.0, <2.0.25
>=2.2.0, <2.2.17
>=2.3.0, <2.3.14
>=2.4.0, <2.4.4
2.0.25
2.2.17
2.3.14
2.4.4

Classification

Weakness
  • CWE-190 Integer Overflow or Wraparound

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.