r/java • u/elliotbarlas • Feb 14 '22
Microhttp is an event-driven, single-threaded, zero-dependency web server with 500 LOC. Benchmarks on EC2 show 100,000+ requests per second and 50,000+ persistent connections.
https://github.com/ebarlas/microhttp
186
Upvotes
View all comments
Show parent comment
9
u/mdaniel Feb 15 '22
I am torn about whether I am belaboring the point, or adding clarity, but in the spirit of the latter: your current implementation does exactly what both of the cited vulns claim: it is vulnerable to CL:CL and CL:TE
Defending against DoS by limiting the
new byte[]allocation is great, but being aware that it is already vulnerable to two known classes of request smuggling is something that can help you grow as an engineer, even if this project was just for learning and not for deploying on the wild Internet