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?
Debian, Ubuntu or Red Hat sometimes backport a fix without changing the upstream version number: such a version reads « to verify », never « 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- 2021-09-0817:15CVE publishedNVD
Observed activity
isMalicious corpus · updated 2026-11-04 03:37 UTCBlock 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| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 2.4 | ≥ 2.4.0, < 2.4.4 | 2.4.4 | NVD · OSV |
| 2.3 | ≥ 2.3.0, < 2.3.14 | 2.3.14 | NVD · OSV |
| 2.2 | ≥ 2.2.0, < 2.2.17 | 2.2.17 | NVD · OSV |
| 2.0 | ≥ 2.0.0, < 2.0.25 | 2.0.25 | NVD · OSV |
| 2.5 | = 2.5 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 33.x | = 33 | no fix published | NVD |
| 34.x | = 34 | no fix published | NVD |
| Branch | Affected | Fixed in | Source |
|---|---|---|---|
| 11.0 | = 11.0 | no fix published | NVD |
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
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
Red Hat Security Advisory: OpenShift Container Platform 4.7.41 security update
Red Hat Security Advisory: OpenShift Container Platform 4.6.53 security update
Red Hat Security Advisory: OpenShift Container Platform 4.8.25 security update
Red Hat Security Advisory: OpenShift Container Platform 4.9.6 packages and security update
Fix
- Update HAProxy to 2.4.4 · 2.3.14 · 2.2.17 · 2.0.25
- 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…
- 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…
- 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…
- 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…
- 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 }
- No fix planned, says the vendor Red Hat Product Security CVE-2021-40346 · 2 productsOut of support scope
Advisories and patches
- git.haproxy.orgPatch · Vendor Advisory
- github.comPatch
- jfrog.comMitigation
Detection
read 2026-11-03 22:42 UTC- Nuclei template
- none so far ProjectDiscovery
- Exploit-DB
- no entry Exploit-DB
- Proof-of-concept repositories
- 7 repositories, unverifiedknqyf263/CVE-2021-40346donky16/CVE-2021-40346-POCalikarimi999/CVE-2021-40346Vulnmachines/HAProxy_CVE-2021-40346alexOarga/CVE-2021-40346 PoC-in-GitHub
- 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
- BIT-haproxy-2021-40346same flawBitnami · Apache-2.0
- EUVD-2021-27525same flawENISA EUVD · LicenseRef-ENISA-legal-notice
- DSA-4968-1advisory covering several CVEsDebian · LicenseRef-unstated
- OESA-2021-1367advisory covering several CVEsopenEuler · LicenseRef-unstated
- openSUSE-SU-2021:1329-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2021:2975-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- openSUSE-SU-2024:10839-1advisory covering several CVEsopenSUSE · LicenseRef-unstated
- RHSA-2021:4118advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2021:5208advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2022:0024advisory covering several CVEsRed Hat · CC-BY-4.0
- RHSA-2022:0114advisory covering several CVEsRed Hat · CC-BY-4.0
- SUSE-SU-2021:2975-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:3257-1advisory covering several CVEsSUSE · LicenseRef-unstated
- SUSE-SU-2021:3258-1advisory covering several CVEsSUSE · LicenseRef-unstated
- USN-5063-1advisory covering several CVEsUbuntu
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?
Is CVE-2021-40346 actively exploited?
What is the CVSS score for CVE-2021-40346?
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
Go further
- Following what attackers exploit right now? The CISA KEV additions of the month, with their patch deadlines.
- Running this software? Vulnerability monitoring alerts you to new vulnerabilities in your products.
Related vulnerabilities
Same product first, then the same vendor advisory and the same publication week.
Sources for this record
- CVE Program · CVE Program Terms of Use
- ENISA EU Vulnerability Database · ENISA legal notice §1.2 (reproduction authorised, provided the source is acknowledged)
- FIRST EPSS · EPSS terms of use (free use, attribution requested)
- NVD · Public domain (17 U.S.C. § 105) for NVD-authored data; third-party content under its own terms
- OSV.dev · Per record, as its publisher states it: each row carries the label in sourceLicense when one is served
- PoC-in-GitHub · CC0-1.0
- Red Hat Product Security (CSAF and VEX) · CC-BY-4.0