CVE-2026-77358

cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()

HIGH
8.2
CVSS Score
Published: August 27, 2026 at 10:37 PM UTC
Updated: September 9, 2026 at 09:27 PM UTC
1 product affected across 1 vendorCpp Httplib

Using cpp-httplib by yhirose?

Get instant alerts when new vulnerabilities affect cpp-httplib - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH8.2
Exploit prediction
EPSS 0.4%
SSVC
PoC

Description

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 0.50
Affected range stops below 0.50, so it looks safe — our inference, not a vendor statement

Remediation

No guide yet

No remediation guidance has been written for this CVE yet, and no fixed version or vendor advisory is recorded against it.

SSVC — Action Prioritization

SSVCPoCAutomatableTotal impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

8.2HIGHGitHub_M
Vector?

Quick Info

StatusDEFERRED
CWE
CWE-416

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card