CVE-2021-22926
JSON

7.5high

CURLOPT_SSLCERT mix-up with Secure Transport

Severity
7.5high CVSS:3.1 by CISA-ADP
Exploit likelihood
15.1% (higher than 96% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
hackerone
Also known as
CURL-CVE-2021-22926

Description

libcurl-using applications can ask for a specific client certificate to be used in a transfer. This is done with the `CURLOPT_SSLCERT` option (`--cert` with the command line tool).When libcurl is built to use the macOS native TLS library Secure Transport, an application can ask for the client certificate by name or with a file name - using the same option. If the name exists as a file, it will be used instead of by name.If the appliction runs with a current working directory that is writable by other users (like `/tmp`), a malicious user can create a file name with the same name as the app wants to use by name, and thereby trick the application to use the file based cert instead of the one referred to by name making libcurl send the wrong client certificate in the TLS connection handshake.

Affected

Product or packageVersionsReported by
https://github.com/curl/curlcurll 7.33.0 to and include 7.77.0CVE List
https://github.com/curl/curl.gitfrom 7.33.0 before 7.78.0, from d2fe616e7e44a106ac976aaeaa441ad7d8a6df11 before fd9b40bf8dfd43edcbc0d254d613d95a11061c05curl
haxx curlfrom 7.33.0 before 7.78.0NVD
netapp active_iq_unified_managerNot specifiedNVD
netapp clustered_data_ontapNot specifiedNVD
netapp hci_management_nodeNot specifiedNVD
netapp oncommand_insightNot specifiedNVD
netapp oncommand_workflow_automationNot specifiedNVD
netapp snapcenterNot specifiedNVD
netapp solidfireNot specifiedNVD
oracle mysql_serverfrom 5.7.0 up to 5.7.35, from 8.0.0 up to 8.0.26NVD
oracle peoplesoft_enterprise_peopletools8.57, 8.58, 8.59NVD

All scores

CISA-ADP7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
curlmedium rating
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:N/I:N/A:P

Classification

CWE-295CWE-840

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.

What each source says

CVE List

libcurl-using applications can ask for a specific client certificate to be used in a transfer. This is done with the `CURLOPT_SSLCERT` option (`--cert` with the command line tool).When libcurl is built to use the macOS native TLS library Secure Transport, an application can ask for the client certificate by name or with a file name - using the same option. If the name exists as a file, it will be used instead of by name.If the appliction runs with a current working directory that is writable by other users (like `/tmp`), a malicious user can create a file name with the same name as the app wants to use by name, and thereby trick the application to use the file based cert instead of the one referred to by name making libcurl send the wrong client certificate in the TLS connection handshake.

curl

libcurl-using applications can ask for a specific client certificate to be used in a transfer. This is done with the CURLOPT_SSLCERT option (--cert with the command line tool).

When libcurl is built to use the macOS native TLS library Secure Transport, an application can ask for the client certificate by name or with a filename - using the same option. If the name exists as a file, it is used instead of by name.

If the application runs with a current working directory that is writable by other users (like /tmp), a malicious user can create a filename with the same name as the app wants to use by name, and thereby trick the application to use the file based cert instead of the one referred to by name making libcurl send the wrong client certificate in the TLS connection handshake.

NVD (es)

Las aplicaciones que usan libcurl pueden pedir un certificado de cliente específico para ser usado en una transferencia. Esto se hace con la opción "CURLOPT_SSLCERT" ("--cert" con la herramienta de línea de comandos).Cuando libcurl se construye para usar la biblioteca TLS nativa de macOS Transporte Seguro, una aplicación puede pedir el certificado del cliente por su nombre o con un nombre de archivo - usando la misma opción. Si la aplicación se ejecuta con un directorio de trabajo actual que puede ser escrito por otros usuarios (como "/tmp"), un usuario malintencionado puede crear un nombre de archivo con el mismo nombre que la aplicación quiere usar por nombre, y así engañar a la aplicación para que use el certificado basado en el archivo en lugar del referido por nombre, haciendo que libcurl envíe el certificado de cliente incorrecto en el handshake de la conexión TLS

References

https://hackerone.com/reports/1234760exploit, third-party-advisory
https://lists.apache.org/thread.html/r61db8e7dcb56dc000a5387a88f7a473bacec5ee01b9ff3f55308aacc%40%3Cdev.kafka.apache.org%3Emailing-list, third-party-advisory
https://lists.apache.org/thread.html/r61db8e7dcb56dc000a5387a88f7a473bacec5ee01b9ff3f55308aacc%40%3Cusers.kafka.apache.org%3Emailing-list, third-party-advisory
https://lists.apache.org/thread.html/rbf4ce74b0d1fa9810dec50ba3ace0caeea677af7c27a97111c06ccb7%40%3Cusers.kafka.apache.org%3Emailing-list, third-party-advisory
https://lists.apache.org/thread.html/rbf4ce74b0d1fa9810dec50ba3ace0caeea677af7c27a97111c06ccb7%40%3Cdev.kafka.apache.org%3Emailing-list, third-party-advisory
https://www.oracle.com/security-alerts/cpuoct2021.htmlpatch, third-party-advisory
https://security.netapp.com/advisory/ntap-20210902-0003/third-party-advisory
https://www.oracle.com/security-alerts/cpujan2022.htmlpatch, third-party-advisory
https://security.netapp.com/advisory/ntap-20211022-0003/third-party-advisory
https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdfpatch, third-party-advisory
https://security.gentoo.org/glsa/202212-01third-party-advisory, vendor-advisory
https://cert-portal.siemens.com/productcert/html/ssa-389290.html

Sources

SourceRecordLicence
CVE ListCVE-2021-22926 changed 2026-10-14CVE Terms of Use
curlCURL-CVE-2021-22926 changed 2026-10-25MIT
NVDCVE-2021-22926 changed 2026-10-14Public domain