CVE-2021-22947
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.
| Package | Ecosystem | Fixed in |
|---|---|---|
| lib32-libcurl-gnutls | Arch Linux | 7.79.0-1 |
| lib32-curl | Arch Linux | 7.79.0-1 |
| libcurl | Amazon Linux | 7.79.1-1.amzn2.0.1 |
| libcurl-devel | Amazon Linux | 7.79.1-1.amzn2.0.1 |
| libcurl-gnutls | Arch Linux | 7.79.0-1 |
| curl | Alpine | 7.79.0-r0 |
| curl | Arch Linux | 7.79.0-1 |
| libcurl-compat | Arch Linux | 7.79.0-1 |
| curl | Amazon Linux | 7.79.1-1.amzn2.0.1 |
| lib32-libcurl-compat | Arch Linux | 7.79.0-1 |
| curl | Ubuntu:Pro:16.04:LTS | 7.47.0-1ubuntu2.19+esm1 |
| universal_forwarder | splunk | 9.0.6, 8.2.12 |
10 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| n/a | https://github.com/curl/curl | curl 7.20.0 to and including 7.78.0 |
| arch | lib32-libcurl-gnutls | 0 |
| arch | lib32-curl | 0 |
| amazon:2 | libcurl | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP | 3.1.0 |
| amazon:2 | libcurl-devel | 0 |
| Siemens | SIMATIC S7-1500 CPU 1518-4 PN/DP MFP | 3.1.0 |
| arch | libcurl-gnutls | 0 |
| Siemens | SIPLUS S7-1500 CPU 1518-4 PN/DP MFP | 3.1.0 |
| alpine | curl | 0 |
| arch | curl | 0 |
| arch | libcurl-compat | 0 |
| amazon:2 | curl | 0 |
| arch | lib32-libcurl-compat | 0 |
| n/a | https://github.com/curl/curl | 7.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
References
- [debian-lts-announce] 20210930 [SECURITY] [DLA 2773-1] curl security update mailing-list
- FEDORA-2021-fc96a3a749 vendor-advisory
- FEDORA-2021-1d24845e93 vendor-advisory
- 20220314 APPLE-SA-2022-03-14-4 macOS Monterey 12.3 mailing-list
- DSA-5197 vendor-advisory
- [debian-lts-announce] 20220828 [SECURITY] [DLA 3085-1] curl security update mailing-list
- GLSA-202212-01 vendor-advisory
- https://cert-portal.siemens.com/productcert/html/ssa-389290.html url
- https://cert-portal.siemens.com/productcert/html/ssa-398330.html url