The vulnerability CVE-2022-32205 occurs because curl versions prior to 7.84.0 did not limit the number or total size of cookies stored from Set-Cookie headers, nor the size of the outgoing Cookie: header. A malicious server could send a large number of cookies, causing subsequent requests (to that server or related ones) to exceed an internal request size limit in curl, leading to a denial of service. The analysis of the fixing commit (48d7064a49148f0394) reveals the specific functions where these limits were introduced. Curl_cookie_add was modified to limit the number of cookies stored per response. Curl_cookie_getlist was modified to limit the number of cookies retrieved to be sent. Curl_http_cookies was modified to limit the total size of the Cookie: header. These functions are directly involved in processing and preparing cookie data, and their previous lack of limits was the root cause of the vulnerability. The introduction of dynbuf in commit ed35d6590e72c23c provided the mechanism for dynamic buffer allocation, which, when used without proper constraints by the cookie handling logic, enabled the vulnerability.