CVE-2026-2436: Libsoup: libsoup: denial of service via use-after-free in soupserver during tls handshake
A flaw was found in libsoup's SoupServer. A remote attacker could exploit a use-after-free vulnerability where the soupserverdisconnect() function frees connection objects prematurely, even if a TLS handshake is still pending. If the handshake completes after the connection object has been freed, a dangling pointer is accessed, leading to a server crash and a Denial of Service.
Other sources
Libsoup: libsoup: denial of service via use-after-free in soupserver during tls handshake
— Microsoft
SoupServer is vulnerable to use after free vulnerability because soupserverdisconnect() frees all SoupServerConnection objects, even if there is a pending GNUTLS handshake to be finished.
A TLS handshake is initiated asynchronously. After creating the SoupServerConnection, libsoup calls gtlsconnectionhandshakeasync(), which registers tlsconnectionhandshakereadycb as a callback. The handshake runs in the background andthe callback fires later when it completes. When the TLS handshake completes successfully, GNUTLS invokes tlsconnectionhandshakereadycb() asynchronously
soupserverdisconnect() is called ( due to some scenario, like a server restart, or other cases). This iterates through all active connections and disconnects them. When the last reference to a SoupServerConnection is dropped, soupserverconnectionfinalize() is called, freeing the object. If the TLS handshake completes after soupserverdisconnect() has freed the connection object, tlsconnectionhandshakereadycb() still fires with a dangling pointer. The callback then calls soupserverconnectionconnected(conn), which attempts to access the freed SoupServerConnection via soupserverconnectiongetiostream(), causing a crash
— Red Hat
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2026-2436?
The severity of CVE-2026-2436 is considered to be high due to its potential to cause a denial of service through a use-after-free vulnerability.
How do I fix CVE-2026-2436?
To fix CVE-2026-2436, update to the latest version of libsoup where the vulnerability has been patched.
Which software is affected by CVE-2026-2436?
CVE-2026-2436 affects GNOME libsoup, as well as specific versions of azl3 libsoup used in Microsoft products and multiple versions of Red Hat Enterprise Linux.
What exploit does CVE-2026-2436 provide to attackers?
CVE-2026-2436 allows remote attackers to exploit a use-after-free condition during a TLS handshake, potentially leading to denial of service.
Is CVE-2026-2436 present in older versions of libsoup?
Yes, CVE-2026-2436 is likely present in older versions of libsoup prior to the patch that addresses this vulnerability.