-
CVSS Score
-The vulnerability stems from the parseV2 function's lack of input validation for HAProxy PROXY v2 header lengths. The original code only checked the address family type but did not validate that rawHdr.Len matched the required length for each family (e.g., 12 bytes for IPv4, 36 for IPv6). This allowed attackers to craft headers with mismatched lengths, causing buffer overreads during parsing. The fix introduced a switch statement with explicit length checks for each address family type, confirming this was the root cause. The associated CWE-20 (Improper Input Validation) and crash reports from malformed headers further corroborate this analysis.
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/mastercactapus/proxyprotocol | go | < 0.0.2 | 0.0.2 |