Vulnerability · Published Sep 29, 2021 · Assigned by hackerone

CVE-2021-22947

Medium 5.9

In plain English

A medium-severity security flaw in https://github.com/curl/curl. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 3.0% (higher than 87% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)3.0%top 12.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official 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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20curl7.79.0-r0ALPINE-CVE-2021-22947
Alpine:v3.21curl7.79.0-r0ALPINE-CVE-2021-22947
Alpine:v3.22curl7.79.0-r0ALPINE-CVE-2021-22947
Alpine:v3.23curl7.79.0-r0ALPINE-CVE-2021-22947
Alpine:v3.24curl7.79.0-r0ALPINE-CVE-2021-22947
Debian:12curl7.79.1-1DEBIAN-CVE-2021-22947
Debian:13curl7.79.1-1DEBIAN-CVE-2021-22947
Debian:14curl7.79.1-1DEBIAN-CVE-2021-22947
Rocky Linux:8curl0:7.61.1-18.el8_4.2RLSA-2021:4059
Ubuntu:22.04:LTScurl7.74.0-1.3ubuntu2UBUNTU-CVE-2021-22947

Affected products (as reported)

VendorProductVersions
n/a https://github.com/curl/curl curl 7.20.0 to and including 7.78.0

Weakness: CWE-310 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

References