VDB

CVE-2021-22947

CVE-2021-22947 PUBLISHED CVSS 5.9 MEDIUM

Reported by hackerone · Published September 29, 2021

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
lib32-libcurl-gnutlsArch Linux7.79.0-1
lib32-curlArch Linux7.79.0-1
libcurlAmazon Linux7.79.1-1.amzn2.0.1
libcurl-develAmazon Linux7.79.1-1.amzn2.0.1
libcurl-gnutlsArch Linux7.79.0-1
curlAlpine7.79.0-r0
curlArch Linux7.79.0-1
libcurl-compatArch Linux7.79.0-1
curlAmazon Linux7.79.1-1.amzn2.0.1
lib32-libcurl-compatArch Linux7.79.0-1
curlUbuntu:Pro:16.04:LTS7.47.0-1ubuntu2.19+esm1
universal_forwardersplunk9.0.6, 8.2.12

10 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 3.1
5.9
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N

Affected products

VendorProductVersions
n/ahttps://github.com/curl/curlcurl 7.20.0 to and including 7.78.0
archlib32-libcurl-gnutls0
archlib32-curl0
amazon:2libcurl0
SiemensSIMATIC S7-1500 CPU 1518F-4 PN/DP MFP3.1.0
amazon:2libcurl-devel0
SiemensSIMATIC S7-1500 CPU 1518-4 PN/DP MFP3.1.0
archlibcurl-gnutls0
SiemensSIPLUS S7-1500 CPU 1518-4 PN/DP MFP3.1.0
alpinecurl0
archcurl0
archlibcurl-compat0
amazon:2curl0
archlib32-libcurl-compat0
n/ahttps://github.com/curl/curl7.20.0

Timeline

  • Sep 24, 2021 PoC Published (5 in total, the first dated here)
  • Sep 29, 2021 CVE Published
  • Sep 30, 2021 EPSS Score (30 in total, the first dated here)
  • Mar 7, 2026 Distribution Patch (20 in total, the first dated here)
  • Mar 7, 2026 Security Advisory (28 in total, the first dated here)
  • Aug 25, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-22947
vulnetix vdb fixes CVE-2021-22947

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-22947/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›