CVE-2026-77358
published high CVSS 4.0 · 8.2cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| yhirose | — | cpp-httplib>= 0.33.0, < 0.50. | Affected | Not stated | GitHub_M |
| SUSE / openSUSE | openSUSE-Tumbleweed | ccacheaarch64 | Advisory build | 4.14.1-1.1 | OPENSUSE-SU-2026:11979-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | ccacheppc64le | Advisory build | 4.14.1-1.1 | OPENSUSE-SU-2026:11979-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | ccaches390x | Advisory build | 4.14.1-1.1 | OPENSUSE-SU-2026:11979-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | ccachex86_64 | Advisory build | 4.14.1-1.1 | OPENSUSE-SU-2026:11979-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 8.2 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| yhirose | cpp-httplib | >= 0.33.0, < 0.50. (affected) | GitHub_M · cna |
Weaknesses
1- CWE-416 CWE-416: Use After Free
References
2Provider assertions
2GitHub_M · cna
cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 61fc9c6169eb36ed11a69f25f00a8169b66fbc27f20d034a3e0ef071766bfd15
- Ingested
- 23 Sep 2026, 09:32:39 UTC
- Source record
- Official CVE record