CVE-2026-77358: CWE-416: Use After Free in yhirose cpp-httplib
Description
cpp-httplib versions 0.33.0 through 0.50.0 contain a use-after-free vulnerability in the TLS-enabled WebSocket client. The issue occurs because the TLS session is freed before the WebSocket close operation completes, causing the WebSocket to access freed memory. This defect can be triggered during normal teardown of a secure WebSocket connection. The vulnerability is fixed in version 0.50.1.
CVSS v4.0
Score 8.2high
Affected software
yhirose
cpp-httplib
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
cpp-httplib is a C++ header-only HTTP/HTTPS library. In versions 0.33.0 through 0.50.0, the TLS-enabled WebSocket client improperly frees the TLS session before closing the WebSocket, which still uses the session. Specifically, in WebSocketClient::shutdown_and_close, the SSL object is freed and its pointer cleared, but the subsequent WebSocket close sends a close frame through the SSL socket stream that holds a raw pointer to the now-freed session. This results in a use-after-free condition. The same issue can be triggered via the client's destructor and connection path, meaning normal teardown of a secure WebSocket connection triggers the defect. The issue is resolved in version 0.50.1.
Potential Impact
Exploitation of this use-after-free vulnerability could lead to memory corruption, potentially causing application crashes or undefined behavior. The CVSS 4.0 score of 8.2 indicates high severity with network attack vector, low attack complexity, no privileges required, no user interaction, and high impact on availability. There is no indication of known exploits in the wild at this time.
Mitigation Recommendations
A fix is available in cpp-httplib version 0.50.1. Users should upgrade to version 0.50.1 or later to remediate this vulnerability. No other vendor advisories or temporary mitigations are provided.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-08-20T19:28:35.245Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a916b3dacd9273b49cabe60
Added to database: 08/28/2026, 11:04:29 UTC
Last enriched: 09/08/2026, 09:07:13 UTC
Last updated: 10/13/2026, 18:48:23 UTC
Views: 76
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.