cve.bz

CVE-2026-77358 yhirose cpp-httplib: Use After Free

8.2 highEPSS 0.4%

High (8.2) in yhirose cpp-httplib. EPSS 0.4% estimated probability of exploitation activity in the next 30 days.

On this page
cpp-httplib is a C++ header-only HTTP/HTTPS library. In versions 0.33.0 through 0.50.0, the TLS-enabled WebSocket client frees the TLS session before closing the WebSocket that still uses it, producing a use-after-free. In WebSocketClient::shutdown_and_close the SSL object is freed and the pointer cleared, but the subsequent WebSocket close still sends a close frame through the SSL socket stream, which holds a raw copy of the now-dangling session pointer and reads from and writes to the freed memory. The same freed-then-used ordering is reachable through the client's destructor and its connect path, so ordinary teardown of a secure WebSocket connection triggers the defect. This issue is fixed in version 0.50.1.

Severity

CVSS 4.0

8.2 high
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
EPSS
0.4% (unchanged from 0.4% a week ago; 0.4% 30 days ago) estimated probability of exploitation activity in the next 30 days; 39th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: yes · Technical impact: total, assessed 2026-08-31. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-416 Use After Free
Published
Modified
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-77358 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-77358?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-77358?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-77358 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
yhirose cpp-httplib>= 0.33.0, < 0.50.

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12, 13, 14cpp-httplibno fix listedDEBIAN-CVE-2026-77358
Ubuntu26.10, Pro:22.04:LTS, Pro:24.04:LTS and 1 morecpp-httplibno fix listedUBUNTU-CVE-2026-77358
openSUSETumbleweedccache4.14.1-1.1openSUSE-SU-2026:11979-1

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · openSUSE.

Red Hat

Red Hat rates this Important.

Red Hat's statement

Red Hat has marked this vulnerability as having an Important severity impact because an unauthenticated remote peer can cause a complete client denial of service through an application crash during routine connection teardown. The issue resides in the TLS-enabled WebSocket client, where deallocating the session prior to closing the socket results in memory corruption via a dangling pointer. While this component is not distributed in core Red Hat Enterprise Linux repositories, client applications building against cpp-httplib headers and establishing secure WebSocket connections are susceptible to unexpected termination.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-77358.

References

Check your stackJSON