Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2021-40346 PoC — Haproxy HAProxy 输入验证错误漏洞

Source
Associated Vulnerability
Title: Haproxy HAProxy 输入验证错误漏洞 (CVE-2021-40346)
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.
Description
CVE-2021-40346 - HaProxy HTTP request smuggling through integer overflow
Readme
# CVE-2021-40346

Integer overflow on header request internal representation allows HTTP request smuggling. This repository presents a PoC built with docker-compose using two docker images: one with a vulnerable version of HaProxy (in this case 2.2.16) and one with a Flask web server using Gunicorn as WSGI. By exploiting the vulnerability we are able to access the ```/admin``` page, whose requests are blocked by HaProxy though a user-defined rule.

# POC

## Requirements

- [Docker](https://docs.docker.com/engine/install/) :whale:
- [Docker compose](https://docs.docker.com/compose/install/) :whale:

## Environment

- HaProxy docker container with port 8000 mapped to host.
- Python docker container with Gunicorn and Flask server with port 5000 open on shared network with the HaProxy container.

## Run PoC
Run the followinf commands on terminal to bring up HaProxy docker container and Flask server image:
```bash
docker-compose up
```
Send the payload to HaProxy:
```bash
cat payload | nc localhost 8000
```

In order to bring it down run:
```bash
docker-compose down
```

## Author
[@alexOarga](https://github.com/alexOarga)



File Snapshot

Log in to view the POC file snapshot cached by Shenlong Bot

Log in to view
Remarks
    1. It is advised to access via the original source first.
    2. Local POC snapshots are reserved for subscribers — if the original source is unavailable, the local mirror is part of the paid plan.
    3. Mirroring, verifying, and maintaining this POC archive takes ongoing effort, so local snapshots are a paid feature. Your subscription keeps the archive online — thank you for the support. View subscription plans →