Skip to main content
Public proof of conceptFix available

CVE-2021-40346

A public proof of concept exists; no exploitation attested.

  • Published2021-09-08
  • Fixed in2.4.4 · 2.3.14 · 2.2.17 · 2.0.25
  • WeaknessCWE-190

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

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.

Timeline

dates in UTC
  1. 2021-09-0817:15CVE publishedNVD

Observed activity

isMalicious corpus · updated 2026-11-04 03:37 UTC
Indicators tagged with this CVE, per day0 indicators over 7 days
Block these indicators
  • Firewall list (EDL, text): https://api.ismalicious.com/edl/cve/CVE-2021-40346?format=txt
  • CSV export: https://api.ismalicious.com/edl/cve/CVE-2021-40346?format=csv
  • TAXII collection of exploited CVEs
  • The EDL and CSV take an API key on the Pro plan.

Versions per branch

NVD · OSV
HAProxy
BranchAffectedFixed in
2.4≥ 2.4.0, < 2.4.42.4.4
2.3≥ 2.3.0, < 2.3.142.3.14
2.2≥ 2.2.0, < 2.2.172.2.17
2.0≥ 2.0.0, < 2.0.252.0.25
2.5= 2.5no fix published
Fedoraproject fedora
BranchAffectedFixed in
33.x= 33no fix published
34.x= 34no fix published
Debian debian linux
BranchAffectedFixed in
11.0= 11.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • haproxyUbuntu:22.04:LTSall versions · fixed in 2.2.9-2ubuntu2
  • haproxyUbuntu:20.04:LTSall versions · fixed in 2.0.13-2ubuntu0.3
  • haproxySUSE:Linux Enterprise High Availability Extension 15 SP3all versions · fixed in 2.0.14-11.11.1
  • haproxySUSE:Linux Enterprise High Availability Extension 15 SP2all versions · fixed in 2.0.14-11.11.1
  • haproxySUSE:Linux Enterprise High Availability Extension 15 SP1all versions · fixed in 2.0.14-8.23.1
  • haproxySUSE:Linux Enterprise High Availability Extension 15all versions · fixed in 2.0.14-3.31.1
  • haproxyRed Hat:openshift:4.9::el8all versions · fixed in 0:2.2.15-2.el8and 1 other package
  • haproxyRed Hat:openshift:4.8::el8all versions · fixed in 0:2.2.13-2.el8and 1 other package

14 more package ranges on OSV.dev

Vendor advisories

  • CVE-2021-40346 Red Hat Product Security37 products fixed · 2 known affected

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

    haproxy.src as a component of Red Hat OpenShift Container Platform 3.11 · haproxy18 as a component of Red Hat OpenShift Container Platform 3.11

  • RHSA-2022:0114 Red Hat Product Security13 products fixed

    Red Hat Security Advisory: OpenShift Container Platform 4.7.41 security update

  • RHSA-2022:0024 Red Hat Product Security13 products fixed

    Red Hat Security Advisory: OpenShift Container Platform 4.6.53 security update

  • RHSA-2021:5208 Red Hat Product Security6 products fixed

    Red Hat Security Advisory: OpenShift Container Platform 4.8.25 security update

  • RHSA-2021:4118 Red Hat Product Security5 products fixed

    Red Hat Security Advisory: OpenShift Container Platform 4.9.6 packages and security update

Full record on NVD

Fix

  1. Update HAProxy to 2.4.4 · 2.3.14 · 2.2.17 · 2.0.25
  2. Vendor fix Red Hat Product Security RHSA-2022:0114 · 13 productsFor OpenShift Container Platform 4.7 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.openshift.com/container-platform/4.7/release_notes/ocp-4-7-r…
  3. Vendor fix Red Hat Product Security RHSA-2022:0024 · 13 productsFor OpenShift Container Platform 4.6 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.openshift.com/container-platform/4.6/release_notes/ocp-4-6-r…
  4. Vendor fix Red Hat Product Security RHSA-2021:5208 · 6 productsFor OpenShift Container Platform 4.8 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.openshift.com/container-platform/4.8/release_notes/ocp-4-8-r…
  5. Vendor fix Red Hat Product Security RHSA-2021:4118 · 5 productsFor OpenShift Container Platform 4.9 see the following documentation, which will be updated shortly for this release, for important instructions on how to upgrade your cluster and fully apply this asynchronous errata update: https://docs.openshift.com/container-platform/4.9/release_notes/ocp-4-9-r…
  6. Workaround from the vendor Red Hat Product Security RHSA-2022:0114 · 52 productsTo 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 }
  7. No fix planned, says the vendor Red Hat Product Security CVE-2021-40346 · 2 productsOut of support scope

Advisories and patches

Detection

read 2026-11-03 22:42 UTC
Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Metasploit modules
none listed
Metasploit Framework

Sources

  • NVDCVSS 3.17.5read 2026-10-23
  • NVDCVSS 2.05read 2026-10-23
  • NVDweakness (CWE)CWE-190read 2026-10-23
  • FIRST EPSSEPSS score58.8 %read 2026-11-03
  • PoC-in-GitHubproof of concept7read 2026-11-03
  • OSVaffected packages—

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Published
2021-09-08
Last Modified
2026-06-17
NVD status
Modified

Frequently asked questions

What is CVE-2021-40346?

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.

Is CVE-2021-40346 actively exploited?

Active exploitation of CVE-2021-40346 has not been confirmed. Its EPSS score was 58.8% on 2026-11-03, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2021-40346?

CVE-2021-40346 has a CVSS v3 base score of 7.5 (HIGH severity), with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.

Running HAProxy? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record