Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [day] [month] [year] [list]
Date: Wed, 19 Jul 2023 08:30:54 +0200 (CEST)
From: Daniel Stenberg <>
To: curl security announcements -- curl users <>,, libcurl hacking <>,
Subject: curl: fopen race condition: CVE-2023-32001

fopen race condition

Project curl Security Advisory, July 19 2023 -


libcurl can be told to save cookie, HSTS and/or alt-svc data to files. When
doing this, it called `stat()` followed by `fopen()` in a way that made it
vulnerable to a TOCTOU race condition problem.

By exploiting this flaw, an attacker could trick the victim to create or
overwrite protected files holding this data in ways it was not intended to.


The attacker needs permissions and rights enough to be able to create or
rename directory entries in the directory the victim saves their files.

This race condition modifies the behavior of symbolic link files in affected
components, they might be followed instead of being overwritten when the
condition is met leading to undesired and potentially destructive behavior.

The Common Vulnerabilities and Exposures (CVE) project has assigned the name
CVE-2023-32001 to this issue.

CWE-367: Time-of-check Time-of-use (TOCTOU) Race Condition

Severity: Medium


- Affected versions: libcurl 7.84.0 to and including 8.1.2
- Not affected versions: libcurl < 7.84.0 and >= 8.2.0
- Introduced-in:

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


- Fixed-in:


  A - Upgrade curl to version 8.2.0

  B - Apply the patch to your local version

  C - Do not save cookie, HSTS or alt-svc data


This issue was reported to the curl project on June 27, 2023. We contacted
distros@...nwall on July 12, 2023.

libcurl 8.2.0 was released on July 2023, coordinated with the publication of
this advisory.


- Reported-by: selmelc on hackerone
- Patched-by: selmelc on hackerone

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.