Hey list,
You can remotely crash httpx v1.7.0 (by ProjectDiscovery) by serving a malformed
tag on your website. The bug is a classic out-of-bounds read in trimTitleTags() due to a missing bounds check when slicing the title string. It panics with:
panic: runtime error: slice bounds out of range [9:6]
Affects anyone using httpx in their automated scanning pipeline. One malformed HTML response = scanner down. Unit testing or fuzzing this function would’ve caught it in 5 minutes. But it’s “just a bug.” 😂
💥 Trigger input:
0
📍 Vulnerable code:
func trimTitleTags(title string) string {
titleBegin := strings.Index(title, ">")
titleEnd := strings.Index(title, "")
if titleEnd < 0 || titleBegin < 0 {
return title
}
return title[titleBegin+1 : titleEnd] // ← PANIC here
}
✅ Fix:
https://github.com/projectdiscovery/httpx/pull/2198
📂 PoC + context:
https://github.com/projectdiscovery/httpx/issues/2197
Crash scanners. Create blind spots. Chain with HTML injection. Happy hunting.
Stay glitchy,
—geeknik