Skip to main content
EPSS 0.4%top 63%

CVE-2026-77358: CWE-416: Use After Free in yhirose cpp-httplib

0
High
VulnerabilityCVE-2026-77358cvecve-2026-77358cwe-416
Published: 08/27/2026 (08/27/2026, 22:37:14 UTC)
Source: CVE Database V5
Vendor/Project: yhirose
Product: 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

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

yhirose

cpp-httplib

Affected versions
>=0.33.0 <0.50.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/08/2026, 09:07:13 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses