curl / Docs / curl CVEs / Bad connection reuse due to flawed path name checks
Awarded 1200 USD


Bad connection reuse due to flawed path name checks

Project curl Security Advisory, July 21st 2021 - Permalink


libcurl keeps previously used connections in a connection pool for subsequent transfers to reuse, if one of them matches the setup.

Due to errors in the logic, the config matching function did not take 'issuer cert' into account and it compared the involved paths case insensitively, which could lead to libcurl reusing wrong connections.

File paths are, or can be, case sensitive on many systems but not all, and can even vary depending on used file systems.

The comparison also did not include the 'issuer cert' which a transfer can set to qualify how to verify the server certificate.


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

CWE-295: Improper Certificate Validation

Severity: Medium


Also note that libcurl is used by many applications, and not always advertised as such.


The SSL configurations are now compared appropriately.


A - Upgrade curl to version 7.78.0

B - Apply the patch to your local version


This issue was reported to the curl project on June 11, 2021.

This advisory was posted on July 21, 2021.


Thanks a lot!