{"id":"CVE-2021-22947","aliases":["CVE-2021-22947","CURL-CVE-2021-22947"],"related":[],"kind":"vulnerability","state":"published","title":"STARTTLS protocol injection via MITM","summary":"When curl >= 7.20.0 and <= 7.78.0 connects to an IMAP or POP3 server to retrieve data using STARTTLS to upgrade to TLS security, the server can respond and send back multiple responses at once that curl caches. curl would then upgrade to TLS but not flush the in-queue of cached responses but instead continue using and trustingthe responses it got *before* the TLS handshake as if they were authenticated.Using this flaw, it allows a Man-In-The-Middle attacker to first inject the fake responses, then pass-through the TLS traffic from the legitimate server and trick curl into sending data back to the user thinking the attacker's injected data comes from the TLS-protected server.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"When curl >= 7.20.0 and <= 7.78.0 connects to an IMAP or POP3 server to retrieve data using STARTTLS to upgrade to TLS security, the server can respond and send back multiple responses at once that curl caches. curl would then upgrade to TLS but not flush the in-queue of cached responses but instead continue using and trustingthe responses it got *before* the TLS handshake as if they were authenticated.Using this flaw, it allows a Man-In-The-Middle attacker to first inject the fake responses, then pass-through the TLS traffic from the legitimate server and trick curl into sending data back to the user thinking the attacker's injected data comes from the TLS-protected server.","source":"cvelist"},{"lang":"en","text":"When curl connects to an IMAP, POP3, SMTP or FTP server to exchange data\nsecurely using STARTTLS to upgrade the connection to TLS level, the server can\nstill respond and send back multiple responses before the TLS upgrade. Such\nmultiple *pipelined* responses are cached by curl. curl would then upgrade to\nTLS but not flush the in-queue of cached responses and instead use and trust\nthe responses it got *before* the TLS handshake as if they were authenticated.\n\nUsing this flaw, it allows a Man-In-The-Middle attacker to first inject the\nfake responses, then pass-through the TLS traffic from the legitimate server\nand trick curl into sending data back to the user thinking the attacker's\ninjected data comes from the TLS-protected server.\n\nOver POP3 and IMAP an attacker can inject fake response data.","format":"markdown","source":"curl"},{"lang":"es","text":"Cuando en  curl versiones posteriores a 7.20.0 incluyéndola, y versiones anteriores a 7.78.0 incluyéndola, se conecta a un servidor IMAP o POP3 para recuperar datos usando STARTTLS para actualizar a la seguridad TLS, el servidor puede responder y enviar múltiples respuestas a la vez que curl almacena en caché. curl entonces actualizaría a TLS pero no vaciaría la cola de respuestas almacenadas en caché, sino que continuaría usando y confiando en las respuestas que obtuvo *antes* del protocolo de enlace TLS como si estuvieran autenticadas. Usando este fallo, permite a un atacante de tipo Man-In-The-Middle inyectar primero las respuestas falsas, luego pasar mediante el tráfico TLS del servidor legítimo y engañar a curl para que envíe datos de vuelta al usuario pensando que los datos inyectados por el atacante provienen del servidor protegido por TLS","source":"nvd"}],"published":"2021-09-15T08:00:00.000Z","modified":"2026-10-25T01:04:42.126Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"curl","scheme":"rating","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N","score":5.9,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","score":4.3,"rating":"MEDIUM"}],"cwes":["CWE-310","CWE-345"],"affected":[{"ranges":[{"version":"curl 7.20.0 to and including 7.78.0","status":"affected"}],"product":"https://github.com/curl/curl","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"7.20.0","status":"affected","fixed":"7.79.0"},{"type":"git","introduced":"ec3bb8f727405642a471b4b1b9eb0118fc003104","status":"affected","fixed":"8ef147c43646e91fdaad5d0e7b60351f842e5c68"}],"repo":"https://github.com/curl/curl.git","source":"curl"},{"ranges":[{"status":"affected","introduced":"7.20.0","fixed":"7.79.0"}],"vendor":"haxx","product":"curl","cpe":"cpe:2.3:a:haxx:curl:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"33"},{"status":"affected","version":"35"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:33:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"9.0"},{"status":"affected","version":"10.0"},{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"cloud_backup","cpe":"cpe:2.3:a:netapp:cloud_backup:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"clustered_data_ontap","cpe":"cpe:2.3:a:netapp:clustered_data_ontap:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h300s_firmware","cpe":"cpe:2.3:o:netapp:h300s_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h500s_firmware","cpe":"cpe:2.3:o:netapp:h500s_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h700s_firmware","cpe":"cpe:2.3:o:netapp:h700s_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h300e_firmware","cpe":"cpe:2.3:o:netapp:h300e_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h500e_firmware","cpe":"cpe:2.3:o:netapp:h500e_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h700e_firmware","cpe":"cpe:2.3:o:netapp:h700e_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"h410s_firmware","cpe":"cpe:2.3:o:netapp:h410s_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[],"vendor":"netapp","product":"solidfire_baseboard_management_controller_firmware","cpe":"cpe:2.3:o:netapp:solidfire_baseboard_management_controller_firmware:-:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"1.11.0"},{"status":"affected","version":"22.1.3"}],"vendor":"oracle","product":"communications_cloud_native_core_binding_support_function","cpe":"cpe:2.3:a:oracle:communications_cloud_native_core_binding_support_function:1.11.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"1.10.0"}],"vendor":"oracle","product":"communications_cloud_native_core_network_function_cloud_native_environment","cpe":"cpe:2.3:a:oracle:communications_cloud_native_core_network_function_cloud_native_environment:1.10.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"1.15.0"},{"status":"affected","version":"1.15.1"},{"status":"affected","version":"22.1.2"},{"status":"affected","version":"22.2.0"}],"vendor":"oracle","product":"communications_cloud_native_core_network_repository_function","cpe":"cpe:2.3:a:oracle:communications_cloud_native_core_network_repository_function:1.15.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"1.8.0"}],"vendor":"oracle","product":"communications_cloud_native_core_network_slice_selection_function","cpe":"cpe:2.3:a:oracle:communications_cloud_native_core_network_slice_selection_function:1.8.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"1.15.0"}],"vendor":"oracle","product":"communications_cloud_native_core_service_communication_proxy","cpe":"cpe:2.3:a:oracle:communications_cloud_native_core_service_communication_proxy:1.15.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","introduced":"5.7.0","lastAffected":"5.7.35"},{"status":"affected","introduced":"8.0.0","lastAffected":"8.0.26"}],"vendor":"oracle","product":"mysql_server","cpe":"cpe:2.3:a:oracle:mysql_server:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"8.57"},{"status":"affected","version":"8.58"},{"status":"affected","version":"8.59"}],"vendor":"oracle","product":"peoplesoft_enterprise_peopletools","cpe":"cpe:2.3:a:oracle:peoplesoft_enterprise_peopletools:8.57:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"1.0.1.1"}],"vendor":"siemens","product":"sinec_infrastructure_network_services","cpe":"cpe:2.3:a:siemens:sinec_infrastructure_network_services:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","fixed":"12.3"}],"vendor":"apple","product":"macos","cpe":"cpe:2.3:o:apple:macos:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"11.3.2"}],"vendor":"oracle","product":"commerce_guided_search","cpe":"cpe:2.3:a:oracle:commerce_guided_search:11.3.2:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"22.2.0"}],"vendor":"oracle","product":"communications_cloud_native_core_console","cpe":"cpe:2.3:a:oracle:communications_cloud_native_core_console:22.2.0:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"22.1.1"}],"vendor":"oracle","product":"communications_cloud_native_core_security_edge_protection_proxy","cpe":"cpe:2.3:a:oracle:communications_cloud_native_core_security_edge_protection_proxy:22.1.1:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","introduced":"8.2.0","fixed":"8.2.12"},{"status":"affected","introduced":"9.0.0","fixed":"9.0.6"},{"status":"affected","version":"9.1.0"}],"vendor":"splunk","product":"universal_forwarder","cpe":"cpe:2.3:a:splunk:universal_forwarder:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://hackerone.com/reports/1334763","tags":["exploit","issue-tracking","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2021/09/msg00022.html","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RWLEC6YVEM2HWUBX67SDGPSY4CQB72OE/","tags":["mailing-list","third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.oracle.com/security-alerts/cpuoct2021.html","tags":["patch","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/APOAK4X73EJTAPTSVT7IRVDMUWVXNWGD/","tags":["mailing-list","third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.oracle.com/security-alerts/cpujan2022.html","tags":["patch","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://security.netapp.com/advisory/ntap-20211029-0003/","tags":["third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"http://seclists.org/fulldisclosure/2022/Mar/29","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.oracle.com/security-alerts/cpuapr2022.html","tags":["patch","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf","tags":["patch","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://support.apple.com/kb/HT213183","tags":["release-notes","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.oracle.com/security-alerts/cpujul2022.html","tags":["patch","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.debian.org/security/2022/dsa-5197","tags":["third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/08/msg00017.html","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://security.gentoo.org/glsa/202212-01","tags":["third-party-advisory","vendor-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-389290.html","tags":[],"sources":["cvelist","nvd"]},{"url":"https://cert-portal.siemens.com/productcert/html/ssa-398330.html","tags":[],"sources":["cvelist","nvd"]}],"credits":["Patrick Monnerat"],"assigner":"hackerone","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"partial","date":"2024-03-28T18:31:17.165Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-22947","url":"https://www.cve.org/CVERecord?id=CVE-2021-22947","licence":"CVE Terms of Use","modified":"2026-10-14T11:34:51.272Z"},{"source":"curl","name":"curl","id":"CURL-CVE-2021-22947","url":"https://osv.dev/vulnerability/CURL-CVE-2021-22947","licence":"MIT","modified":"2026-10-25T01:04:42.126Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-22947","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-22947","licence":"Public domain","modified":"2026-10-14T12:17:09.210Z"}],"updatedAt":"2026-11-25T22:58:04.225Z","epss":{"score":0.03022,"percentile":0.88213,"date":"2026-11-30T12:00:22.000Z"}}