Every CVE Search/ Get API key

CVE-2021-22945

When sending data to an MQTT server, libcurl <= 7.73.0 and 7.78.0 could in some circumstances...

9.1 CriticalFix available

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

6.68%Up 6.3 points since Sep 24, 2021
90%50%10%1%

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 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
CVSS 2.0
5.8 MediumAV: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H
CVSS 2.0
5.8 MediumAV: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 HighCVSS: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 CriticalCVSS: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

Show 8 moreShow less

Affected packages

Affected packages
PackageAffectedFixed
curl
Alpine:v3.11
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.12
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.13
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.14
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.15
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.16
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.17
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.18
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.19
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.20
before 7.79.0-r0
7.79.0-r0
Show 17 moreShow less
Affected packages
PackageAffectedFixed
curl
Alpine:v3.21
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.22
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.23
before 7.79.0-r0
7.79.0-r0
curl
Alpine:v3.24
before 7.79.0-r0
7.79.0-r0
curl
Azure Linux:2
before 7.82.0-1
7.82.0-1
curl
Debian:12
before 7.79.1-1
7.79.1-1
curl
Debian:13
before 7.79.1-1
7.79.1-1
curl
Debian:14
before 7.79.1-1
7.79.1-1
curl
Debian: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_jll
Julia
7.70.0+0 up to 7.81.0+0
7.81.0+0
curl
Mageia:8
From an advisory covering 3 CVEs
before 7.74.0-1.4.mga8
7.74.0-1.4.mga8
curl
openEuler:20.03-LTS-SP1
From an advisory covering 3 CVEs
before 7.71.1-11.oe1
7.71.1-11.oe1
curl
openEuler:20.03-LTS-SP2
From an advisory covering 3 CVEs
before 7.71.1-11.oe1
7.71.1-11.oe1
curl
Ubuntu:22.04:LTS
before 7.74.0-1.3ubuntu2
7.74.0-1.3ubuntu2
curl
Ubuntu: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 less
7.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
curl
Ubuntu: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 less
7.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
curl
openSUSE:Tumbleweed
From an advisory covering 48 CVEs
before 7.79.1-1.1
7.79.1-1.1

History

History
RecordedChangedSources
affected, facts
first indexedCVE 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

Show 75 moreShow less
MoveEnter Open