CVE-2021-22947

curl: Server responses received before STARTTLS processed after TLS handshake

Published Sep 29, 2021 CVSS 3.1 · 5.9 Medium EPSS 3.0% KEV · Not listed
Description
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-2773-1 curl security update
Debian DLA Debian DLA DLA-3085-1 curl security update
Debian DSA Debian DSA DSA-5197-1 curl security update
Ubuntu USN Ubuntu USN USN-5079-1 curl vulnerabilities
Ubuntu USN Ubuntu USN USN-5079-2 curl vulnerabilities
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
hackerone
Published
Updated
Oct 14, 2026, 11:34 AM
Reserved
Jan 6, 2021, 12:00 AM
Status
Modified
Published
Sep 29, 2021, 8:15 PM
Modified
Oct 14, 2026, 12:17 PM
Severity
Moderate
Public date
Sep 15, 2021, 12:00 AM