CVE-2021-22945
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances...
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.1
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
CVE-2021-22945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - CVSS 2.0
- 5.8 Medium
AV:N/AC:M/Au:N/C:P/I:N/A:P - Weakness
- CWE-415
- Updated
- 2026-11-02
CVE List
9.1
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
CVE-2021-22945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Weakness
- CWE-415, CWE-415
- Updated
- 2026-11-02
EUVDEUVD-2021-10073
9.1
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
EUVD-2021-10073- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-22mx-9r92-42g8
9.1
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances...
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
GHSA-22mx-9r92-42g8- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Weakness
- CWE-415
- Updated
- 2026-11-02
OSVALPINE-CVE-2021-22945
9.1
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
ALPINE-CVE-2021-22945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVAZL-6368
9.1
CVE-2021-22945 affecting package curl for versions less than 7.82.0-1
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
AZL-6368- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
Show 10 moreShow less
OSVBELL-CVE-2021-22945
9.1
CVE-2021-22945 does not affect BellSoft software
- Record
BELL-CVE-2021-22945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSV
9.1
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
CVE-2021-22945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-22945
9.1
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
DEBIAN-CVE-2021-22945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVJLSEC-2025-29
9.1
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances...
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
JLSEC-2025-29- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - CVSS 2.0
- 5.8 Medium
AV:N/AC:M/Au:N/C:P/I:N/A:P - Updated
- 2026-11-02
OSVOESA-2021-1382
7.4
curl security update
cURL is a computer software project providing a library (libcurl) and command-line tool (curl) for transferring data using various protocols.
Security Fix(es):
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.(CVE-2021-22947)
A user can tell curl >= 7.20.0 and <= 7.78.0 to require a successful upgrade to TLS when speaking to an IMAP, POP3 or FTP server (--ssl-reqd on the command line orCURLOPT_USE_SSL set to CURLUSESSL_CONTROL or CURLUSESSL_ALL withlibcurl). This requirement could be bypassed if the server would return a properly crafted but perfectly legitimate response.This flaw would then make curl silently continue its operations withoutTLS contrary to the instructions and expectations, exposing possibly sensitive data in clear text over the network.(CVE-2021-22946)
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.(CVE-2021-22945)
- Record
OESA-2021-1382- CVSS 3.1
- 7.4 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-22945
9.1
When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
UBUNTU-CVE-2021-22945- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVCURL-CVE-2021-22945 No score
UAF and double free in MQTT sending
When sending data to an MQTT server, libcurl could in some circumstances erroneously keep a pointer to an already freed memory area and both use that again in a subsequent call to send data and also free it again.
- Record
CURL-CVE-2021-22945- Updated
- 2026-11-02
OSVMGASA-2021-0438 No score
Updated curl packages fix security vulnerability
UAF and double-free in MQTT sending. (CVE-2021-22945)
Protocol downgrade required TLS bypassed. (CVE-2021-22946)
STARTTLS protocol injection via MITM. (CVE-2021-22947)
- Record
MGASA-2021-0438- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:10582-1 No score
curl-7.79.1-1.1 on GA media
These are all security issues fixed in the curl-7.79.1-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:10582-1- Updated
- 2026-11-02
OSVUSN-5079-1 No score
curl vulnerabilities
It was discovered that curl incorrect handled memory when sending data to an MQTT server. A remote attacker could use this issue to cause curl to crash, resulting in a denial of service, or possibly execute arbitrary code. (CVE-2021-22945)
Patrick Monnerat discovered that curl incorrectly handled upgrades to TLS. When receiving certain responses from servers, curl would continue without TLS even when the option to require a successful upgrade to TLS was specified. (CVE-2021-22946)
Patrick Monnerat discovered that curl incorrectly handled responses received before STARTTLS. A remote attacker could possibly use this issue to inject responses and intercept communications. (CVE-2021-22947)
- Record
USN-5079-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
curlAlpine:v3.11 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.12 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.13 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.14 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.15 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.16 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.17 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.18 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.19 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.20 |
before 7.79.0-r0 | 7.79.0-r0 |
Show 17 moreShow less
| Package | Affected | Fixed |
|---|---|---|
curlAlpine:v3.21 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.22 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.23 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAlpine:v3.24 |
before 7.79.0-r0 | 7.79.0-r0 |
curlAzure Linux:2 |
before 7.82.0-1 | 7.82.0-1 |
curlDebian:12 |
before 7.79.1-1 | 7.79.1-1 |
curlDebian:13 |
before 7.79.1-1 | 7.79.1-1 |
curlDebian:14 |
before 7.79.1-1 | 7.79.1-1 |
curlDebian:11 From an advisory covering 15 CVEs |
before 7.74.0-1.3+deb11u2, plus listed versions 7.74.0-1.37.74.0-1.3+deb11u1 |
7.74.0-1.3+deb11u2 |
LibCURL_jllJulia |
7.70.0+0 up to 7.81.0+0 | 7.81.0+0 |
curlMageia:8 From an advisory covering 3 CVEs |
before 7.74.0-1.4.mga8 | 7.74.0-1.4.mga8 |
curlopenEuler:20.03-LTS-SP1 From an advisory covering 3 CVEs |
before 7.71.1-11.oe1 | 7.71.1-11.oe1 |
curlopenEuler:20.03-LTS-SP2 From an advisory covering 3 CVEs |
before 7.71.1-11.oe1 | 7.71.1-11.oe1 |
curlUbuntu:22.04:LTS |
before 7.74.0-1.3ubuntu2 | 7.74.0-1.3ubuntu2 |
curlUbuntu:18.04:LTS From an advisory covering 3 CVEs |
before 7.58.0-2ubuntu3.15, plus listed versions 7.55.1-1ubuntu27.55.1-1ubuntu2.17.57.0-1ubuntu17.58.0-2ubuntu17.58.0-2ubuntu2 Show 13 moreShow less7.58.0-2ubuntu37.58.0-2ubuntu3.17.58.0-2ubuntu3.27.58.0-2ubuntu3.37.58.0-2ubuntu3.57.58.0-2ubuntu3.67.58.0-2ubuntu3.77.58.0-2ubuntu3.87.58.0-2ubuntu3.97.58.0-2ubuntu3.107.58.0-2ubuntu3.127.58.0-2ubuntu3.137.58.0-2ubuntu3.14 |
7.58.0-2ubuntu3.15 |
curlUbuntu:20.04:LTS From an advisory covering 3 CVEs |
before 7.68.0-1ubuntu2.7, plus listed versions 7.65.3-1ubuntu37.65.3-1ubuntu47.66.0-1ubuntu17.67.0-2ubuntu17.68.0-1ubuntu1 Show 6 moreShow less7.68.0-1ubuntu27.68.0-1ubuntu2.17.68.0-1ubuntu2.27.68.0-1ubuntu2.47.68.0-1ubuntu2.57.68.0-1ubuntu2.6 |
7.68.0-1ubuntu2.7 |
curlopenSUSE:Tumbleweed From an advisory covering 48 CVEs |
before 7.79.1-1.1 | 7.79.1-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-22945 is a critical vulnerability (CVSS 9.1) in Haxx Libcurl, published September 15, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 6.68%, the 93rd percentile. Fixed in curl 7.79.0-r0.
References
hackerone.com/reports/1269242
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RWLEC6YVEM2HWUBX67SDGPSY4CQB72OE
oracle.com/security-alerts/cpuoct2021.html
security.netapp.com/advisory/ntap-20211029-0003
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/APOAK4X73EJTAPTSVT7IRVDMUWVXNWGD
cert-portal.siemens.com/productcert/pdf/ssa-389290.pdf
Show 75 moreShow less
support.apple.com/kb/HT213183
seclists.org/fulldisclosure/2022/Mar/29
debian.org/security/2022/dsa-5197
security.gentoo.org/glsa/202212-01
cert-portal.siemens.com/productcert/html/ssa-389290.html
cert-portal.siemens.com/productcert/html/ssa-398330.html
nvd.nist.gov/vuln/detail/CVE-2021-22945
lists.fedoraproject.org/archives/list/[email protected]/message/APOAK4X73EJTAPTSVT7IRVDMUWVXNWGD
lists.fedoraproject.org/archives/list/[email protected]/message/RWLEC6YVEM2HWUBX67SDGPSY4CQB72OE
github.com/advisories/GHSA-22mx-9r92-42g8
security.alpinelinux.org/vuln/CVE-2021-22945
docs.bell-sw.com/security/cves/CVE-2021-22945
security-tracker.debian.org/tracker/CVE-2021-22945
advisories.mageia.org/MGASA-2021-0438.html
bugs.mageia.org/show_bug.cgi?id=29461
curl.se/docs/CVE-2021-22945.html
curl.se/docs/CVE-2021-22946.html
curl.se/docs/CVE-2021-22947.html
ubuntu.com/security/notices/USN-5079-1
lists.fedoraproject.org/archives/list/[email protected]/thread/J64OFB3I6OV4T3FD3PVSPTCKGUJCXUXX
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2021-1382
nvd.nist.gov/vuln/detail/CVE-2021-22947
nvd.nist.gov/vuln/detail/CVE-2021-22946
ubuntu.com/security/CVE-2021-22945
cve.org/CVERecord?id=CVE-2021-22945
ubuntu.com/security/CVE-2021-22946
ubuntu.com/security/CVE-2021-22947
suse.com/security/cve/CVE-2006-1061
suse.com/security/cve/CVE-2016-9586
suse.com/security/cve/CVE-2016-9594
suse.com/security/cve/CVE-2017-1000099
suse.com/security/cve/CVE-2017-1000100
suse.com/security/cve/CVE-2017-1000101
suse.com/security/cve/CVE-2017-1000254
suse.com/security/cve/CVE-2017-1000257
suse.com/security/cve/CVE-2017-2629
suse.com/security/cve/CVE-2017-7468
suse.com/security/cve/CVE-2017-8816
suse.com/security/cve/CVE-2017-8817
suse.com/security/cve/CVE-2017-8818
suse.com/security/cve/CVE-2017-9502
suse.com/security/cve/CVE-2018-0500
suse.com/security/cve/CVE-2018-1000005
suse.com/security/cve/CVE-2018-1000120
suse.com/security/cve/CVE-2018-1000122
suse.com/security/cve/CVE-2018-1000300
suse.com/security/cve/CVE-2018-1000301
suse.com/security/cve/CVE-2018-14618
suse.com/security/cve/CVE-2018-16839
suse.com/security/cve/CVE-2018-16840
suse.com/security/cve/CVE-2018-16842
suse.com/security/cve/CVE-2018-16890
suse.com/security/cve/CVE-2019-15601
suse.com/security/cve/CVE-2019-3822
suse.com/security/cve/CVE-2019-3823
suse.com/security/cve/CVE-2019-5435
suse.com/security/cve/CVE-2019-5436
suse.com/security/cve/CVE-2019-5481
suse.com/security/cve/CVE-2019-5482
suse.com/security/cve/CVE-2020-8169
suse.com/security/cve/CVE-2020-8231
suse.com/security/cve/CVE-2020-8284
suse.com/security/cve/CVE-2020-8285
suse.com/security/cve/CVE-2020-8286
suse.com/security/cve/CVE-2021-22297
suse.com/security/cve/CVE-2021-22298
suse.com/security/cve/CVE-2021-22876
suse.com/security/cve/CVE-2021-22890
suse.com/security/cve/CVE-2021-22898
suse.com/security/cve/CVE-2021-22901
suse.com/security/cve/CVE-2021-22922
suse.com/security/cve/CVE-2021-22924
suse.com/security/cve/CVE-2021-22945
suse.com/security/cve/CVE-2021-22946
suse.com/security/cve/CVE-2021-22947