CVE-2026-77358

Source
https://cve.org/CVERecord?id=CVE-2026-77358
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-77358.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-77358
Aliases
  • GHSA-w7p7-f35j-mw7q
Downstream
Published
2026-08-27T22:37:14.339Z
Modified
2026-08-29T03:47:16.451239832Z
Severity
  • 8.2 (High) CVSS_V4 - 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 CVSS Calculator
Summary
cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()
Details

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::shutdownandclose 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.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77358.json",
    "cwe_ids": [
        "CWE-416"
    ],
    "cna_assigner": "GitHub_M"
}
References

Affected packages

Git / github.com/yhirose/cpp-httplib

Affected ranges

Type
GIT
Repo
https://github.com/yhirose/cpp-httplib
Events
Database specific
Show details
{
    "source": "AFFECTED_FIELD",
    "extracted_events": [
        {
            "introduced": "0.33.0"
        },
        {
            "fixed": "0.50."
        }
    ]
}

Affected versions

Other
latest
v0.*
v0.33.0
v0.33.1
v0.34.0
v0.35.0
v0.37.0
v0.37.1
v0.37.2
v0.38.0
v0.39.0
v0.40.0
v0.41.0
v0.42.0
v0.43.0
v0.43.1
v0.43.2
v0.43.3
v0.43.4
v0.44.0
v0.45.0
v0.45.1
v0.46.0
v0.46.1
v0.47.0
v0.48.0
v0.49.0

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-77358.json"