Unauthenticated Denial of Service in Vouch Proxy
Vouch Proxy contains an unauthenticated heap-allocation vulnerability in its multipart cookie reassembly logic that allows remote attackers to crash the service via a crafted HTTP cookie.
Vouch Proxy version 0.47.2 is susceptible to an unauthenticated remote denial-of-service vulnerability due to unsafe parsing of multipart cookies. The vulnerability resides in the pkg/cookie/cookie.go file within the Cookie() function, which reassembles multipart cookies based on names containing the _NofM suffix. An attacker can craft a specific HTTP request containing a cookie name with an arbitrarily large integer for the total part count (e.g., VouchCookie_1of10000000000). This value is parsed via strconv.Atoi and passed directly to make([]string, numParts) without bounds checking. Because this logic executes before authentication during the request handling flow, an attacker can trigger an immediate out-of-memory fatal error in the Go runtime, crashing the process. This attack is highly reliable and does not require a valid session.
Attack Chain
- Attacker identifies a target server running Vouch Proxy.
- Attacker crafts a malicious HTTP GET request targeting the
/validateor/_external-auth-:idendpoint. - Attacker injects a malicious
Cookieheader into the request, specifically using the formatVouchCookie_1of<Large_Integer>=x. - Vouch Proxy receives the request and, before any authentication, invokes the
JWTCacheHandler. - The
JWTCacheHandlercallsFindJWT, which subsequently calls the vulnerablecookie.Cookiefunction. - The
cookie.Cookiefunction splits the cookie name suffix and parses the attacker-controlled total part count viastrconv.Atoi. - The application executes
make([]string, numParts)with the unvalidated large integer. - The Go runtime attempts to allocate massive amounts of memory, resulting in a fatal out-of-memory crash and immediate denial-of-service.
Impact
Successful exploitation results in an immediate crash of the Vouch Proxy process. In containerized environments, the service will repeatedly restart, potentially creating a persistent state of denial-of-service if the attacker continues to send the payload. As Vouch Proxy is typically deployed as an authentication gateway, its unavailability can render protected downstream applications unreachable or cause them to fail-open, potentially leading to unauthorized access depending on the reverse-proxy configuration.
Recommendation
Prioritized actions for detection engineering and security teams:
- Patch Vouch Proxy to the latest version to include input validation for multipart cookie names and strict bounds checking on part counts.
- Apply WAF rules to block or sanitize HTTP requests containing cookie names that exceed reasonable length or format expectations for
_NofMmultipart suffixes. - Implement monitoring for service crashes and frequent container restarts in the Vouch Proxy environment to identify potential exploitation attempts.
- Deploy the Sigma rule below to detect abnormal cookie header values that indicate exploitation attempts.
Immediate actions
Deploy WAF rule to block requests with excessive multipart cookie counts
Mitigations
Upgrade Vouch Proxy to current version
Vouch Proxy (0.47.2)
Detection coverage 1
Detect Vouch Proxy Denial of Service Attempt
highDetects HTTP requests containing multipart cookie names with extremely large part counts indicative of CVE-like exploitation attempts against Vouch Proxy.
Detection queries are available on the platform. Get full rules →