Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 27 Jun 2022 08:19:23 +0200 (CEST)
From: Daniel Stenberg <>
To: curl security announcements -- curl users <>,, libcurl hacking <>,
Subject: [SECURITY ADVISORY] curl: CVE-2022-32205: Set-Cookie denial of

CVE-2022-32205: Set-Cookie denial of service

┬┤Project curl Security Advisory, June 27th 2022 -


A malicious server can serve excessive amounts of `Set-Cookie:` headers in a
HTTP response to curl and curl stores all of them. A sufficiently large amount
of (big) cookies make subsequent HTTP requests to this, or other servers to
which the cookies match, create requests that become larger than the threshold
that curl uses internally to avoid sending crazy large requests (1048576
bytes) and instead returns an error.

This denial state might remain for as long as the same cookies are kept, match
and haven't expired. Due to cookie matching rules, a server on
`` can set cookies that also would match for ``,
making it it possible for a "sister server" to effectively cause a denial of
service for a sibling site on the same second level domain using this method.

We are not aware of any exploit of this flaw.


CVE-2022-32205 was introduced in [commit
shipped in curl 7.71.0 with the introduction of the "dynbuf"
internally. Before this change, curl had no limit in how large HTTP request it
could generate.

CWE-770: Allocation of Resources Without Limits or Throttling

Severity: Low


- Affected versions: curl 7.71.0 to and including 7.83.1
- Not affected versions: curl < 7.71.0 and curl >= 7.84.0

libcurl is used by many applications, but not always advertised as such!


We introduce several new limits and thresholds for cookies:

- Send no more than 150 cookies per request
- Cap the max length used for an outgoing `Cookie:` header to 8K
- Cap the max number of accepted `Set-Cookie:` header fields to 50

A [fix for CVE-2022-32205](


  A - Upgrade curl to version 7.84.0

  B - Apply the patch to your local version

  C - Do not use cookies


This issue was reported to the curl project on May 13, 2022. We contacted
distros@...nwall on June 20.

libcurl 7.84.0 was released on June 27 2022, coordinated with the publication
of this advisory.


This issue was reported by Harry Sintonen. Patched by Daniel Stenberg.

Thanks a lot!


  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features

Powered by blists - more mailing lists

Please check out the Open Source Software Security Wiki, which is counterpart to this mailing list.

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.