Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CVE-2026-77358— cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()

Quick assessment

Affected
yhirose cpp-httplib
Exploitation
No confirmed in-the-wild exploitation; assess based on exposure
Recommended action
Check the vendor advisory and references for a fixed version. If immediate upgrade is impossible, restrict exposure and increase monitoring.

cpp-httplib 是一个仅包含头文件的 C++ HTTP/HTTPS 库。在 0.33.0 至 0.50.0 版本中,启用 TLS 的 WebSocket 客户端在关闭仍在使用 TLS 会话的 WebSocket 连接之前,先释放了该 TLS 会话,从而导致了“释放后使用”(use-after-free)缺陷。 在 中,SSL 对象被释放且其指针被置空,但随后的 WebSocket 关闭操作仍会通过 SSL 套接字流发送关闭帧;该流内部持有一个已释放会话的裸指针副本,从而在已释放的内存上进行读写操作。这种“先

CVSS 8.2 · High EPSS 0.29% · P21

Possible ATT&CK Techniques 1 AI

T1218 · System Binary Proxy Execution

Affected Version Matrix 1

VendorProduct Version RangeStatus
yhirose cpp-httplib >= 0.33.0, < 0.50. affected
Get alerts for future matching vulnerabilities Log in to subscribe

I. Basic Information for CVE-2026-77358

Vulnerability Information

Have questions about the vulnerability? See if Shenlong's analysis helps!
View Shenlong Deep Dive ↗

Although we use advanced large model technology, its output may still contain inaccurate or outdated information.Shenlong tries to ensure data accuracy, but please verify and judge based on the actual situation.

Vulnerability Title
cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()
Source: CVE Program / CVE List V5
Vulnerability 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.
Source: CVE Program / CVE List V5
CVSS Information
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
Source: CVE Program / CVE List V5
Vulnerability Type
释放后使用
Source: CVE Program / CVE List V5

Affected Products

Vendor Product Affected Versions CPE Subscribe
yhirose cpp-httplib >= 0.33.0, < 0.50. -

II. Public POCs for CVE-2026-77358

# POC Description Source Link Shenlong Link
AI-Generated POC Premium

No public POC found.

Login to generate AI POC

III. Intelligence Information for CVE-2026-77358

登录查看更多情报信息。

Patches & Fixes for CVE-2026-77358 (1)

Vendor Advisories for CVE-2026-77358 (1)

IV. Related Vulnerabilities

V. Comments for CVE-2026-77358

No comments yet


Leave a comment