{"id":"CVE-2026-77358","aliases":["DEBIAN-CVE-2026-77358","EUVD-2026-67302","GHSA-w7p7-f35j-mw7q","OESA-2026-3800","OESA-2026-3801","OESA-2026-3961","UBUNTU-CVE-2026-77358","openSUSE-SU-2026:11979-1"],"status":"published","title":"cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()","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.","severity":{"version":"4.0","score":8.2,"vector":"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","level":"high","assessor":"cna","from":"cve"},"epss":{"day":"2026-11-09","score":0.00445,"percentile":0.38934,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-416"],"published":"2026-08-27T22:37:14Z","modified":"2026-10-28T11:17:52Z","fixes":[{"ecosystem":"openEuler:24.03-LTS-SP4","package":"cpp-httplib","fixed_in":["0.46.0-2.oe2403sp4"],"sources":["osv"]},{"ecosystem":"openEuler:24.03-LTS-SP1","package":"cpp-httplib","fixed_in":["0.46.0-2.oe2403sp1"],"sources":["osv"]},{"ecosystem":"openEuler:24.03-LTS-SP3","package":"cpp-httplib","fixed_in":["0.46.0-2.oe2403sp3"],"sources":["osv"]}],"affected":[{"source":"osv","ecosystem":"Debian:12","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.11.4+ds-1","0.11.4+ds-1+deb12u1","0.11.4+ds-2","0.11.4+ds-3","0.13.1+ds-1","0.14.0+ds-1","0.14.1+ds-1","0.14.1+ds-2","0.14.2+ds-1","0.14.3+ds-1","0.14.3+ds-1.1","0.14.3+ds-1.1~exp1","0.15.3+ds-1","0.15.3+ds-2","0.15.3+ds-3","0.16.0+ds-1","0.16.3+ds-1","0.16.3+ds-2","0.18.0+ds-1","0.18.7-1","0.20.1+ds-3","0.25.0+ds-1","0.26.0+ds-2","0.41.0+ds-1","0.41.0+ds-2","0.41.0+ds-3","0.41.0+ds-3~bpo13+1"]},{"source":"osv","ecosystem":"Debian:13","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.18.7-1","0.18.7-1+deb13u1","0.20.1+ds-3","0.25.0+ds-1","0.26.0+ds-2","0.41.0+ds-1","0.41.0+ds-2","0.41.0+ds-3","0.41.0+ds-3~bpo13+1"]},{"source":"osv","ecosystem":"Debian:14","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.18.7-1","0.20.1+ds-3","0.25.0+ds-1","0.26.0+ds-2","0.41.0+ds-1","0.41.0+ds-2","0.41.0+ds-3","0.41.0+ds-3~bpo13+1"]},{"source":"osv","ecosystem":"openEuler:24.03-LTS-SP4","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.46.0-2.oe2403sp4"}]}]},{"source":"osv","ecosystem":"openEuler:24.03-LTS-SP1","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.46.0-2.oe2403sp1"}]}]},{"source":"osv","ecosystem":"openEuler:24.03-LTS-SP3","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"0.46.0-2.oe2403sp3"}]}]},{"source":"osv","ecosystem":"Ubuntu:Pro:22.04:LTS","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.9.9+ds-1","0.9.10+ds-1","0.10.1+ds-1","0.10.2+ds-1","0.10.3+ds-1","0.10.3+ds-1ubuntu0.1~esm1","0.10.3+ds-1ubuntu0.1~esm2"]},{"source":"osv","ecosystem":"Ubuntu:Pro:24.04:LTS","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.13.1+ds-1ubuntu1","0.14.3+ds-1","0.14.3+ds-1.1","0.14.3+ds-1.1build1","0.14.3+ds-1.1build2","0.14.3+ds-1.1ubuntu0.1~esm1","0.14.3+ds-1.1ubuntu0.1~esm2"]},{"source":"osv","ecosystem":"Ubuntu:26.10","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.26.0+ds-2ubuntu3","0.26.0+ds-2ubuntu4"]},{"source":"osv","ecosystem":"Ubuntu:Pro:26.04:LTS","package":"cpp-httplib","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["0.18.7-1","0.26.0+ds-2ubuntu2","0.26.0+ds-2ubuntu3","0.26.0+ds-2ubuntu3+esm1"]},{"source":"osv","ecosystem":"openSUSE:Tumbleweed","package":"ccache","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.14.1-1.1"}]}],"bundled":2}],"products":[{"vendor":"yhirose","product":"cpp-httplib"}],"references":[{"url":"https://github.com/yhirose/cpp-httplib/security/advisories/GHSA-w7p7-f35j-mw7q","tags":["x_refsource_CONFIRM","exploit","advisory","report"]},{"url":"https://github.com/yhirose/cpp-httplib/commit/2f986fd5e56e7c5f686d965174516360930f371d","tags":["x_refsource_MISC","fix","report"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/77xxx/CVE-2026-77358.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77358","tags":["advisory"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-77358","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-3800","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-3801","tags":["advisory"]},{"url":"https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2026-3961","tags":["advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-77358","tags":["report"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-77358","tags":["report"]},{"url":"","tags":["advisory"]},{"url":"https://www.suse.com/security/cve/CVE-2026-77341","tags":["web"]},{"url":"https://www.suse.com/security/cve/CVE-2026-77358","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2026-77358","title":"cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()","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.","status":"published","published":"2026-08-27T22:37:14.339Z","modified":"2026-08-31T18:25:37.895Z","cvss":[{"version":"4.0","score":8.2,"vector":"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","level":"high","assessor":"cna"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:20:15.712761Z"}],"euvd":[{"id":"EUVD-2026-67302","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.","status":"published","published":"2026-08-27T22:37:14Z","modified":"2026-08-31T18:25:37Z","cvss":[{"version":"4.0","score":8.2,"vector":"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","level":"high"}],"updated_at":"2026-11-02T18:01:20.215322Z"}],"nvd":[{"id":"CVE-2026-77358","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.","status":"published","published":"2026-08-28T00:18:15.79Z","modified":"2026-09-09T21:09:13.08Z","cvss":[{"version":"4.0","score":8.2,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high","assessor":"secondary"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T14:12:42.035353Z"}],"osv":[{"id":"CVE-2026-77358","title":"cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()","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.","status":"published","published":"2026-08-27T22:37:14.339Z","modified":"2026-10-28T11:17:52.309066673Z","cvss":[{"version":"4.0","score":8.2,"vector":"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","level":"high"}],"cwes":["CWE-416"],"updated_at":"2026-11-02T15:45:17.102988Z"},{"id":"DEBIAN-CVE-2026-77358","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.","status":"published","published":"2026-08-28T00:18:15.79Z","modified":"2026-10-01T03:03:42.035797123Z","cvss":[{"version":"4.0","score":8.2,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"}],"updated_at":"2026-11-02T15:46:03.502256Z"},{"id":"OESA-2026-3800","title":"cpp-httplib security update","description":"A C++11 single-file header-only cross platform HTTP/HTTPS library. It\u0026amp;apos;s extremely easy to setup. Just include httplib.h file in your code!\r\n\r\nSecurity Fix(es):\n\nA vulnerability, classified as critical, has been found in yhirose cpp-httplib up to version 0.33.0 and version 0.50.0. This is a CWE-416 Use After Free vulnerability in the WebSocket Client\u0026apos;s shutdown_and_close function. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. The vulnerability impacts confidentiality, integrity, and availability.(CVE-2026-77358)","status":"published","published":"2026-09-14T16:34:29Z","modified":"2026-09-13T16:45:43.492828041Z","cvss":[{"version":"4.0","score":8.2,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"}],"updated_at":"2026-11-02T15:52:47.217107Z"},{"id":"OESA-2026-3801","title":"cpp-httplib security update","description":"A C++11 single-file header-only cross platform HTTP/HTTPS library. It\u0026amp;apos;s extremely easy to setup. Just include httplib.h file in your code!\r\n\r\nSecurity Fix(es):\n\nA vulnerability, classified as critical, has been found in yhirose cpp-httplib up to version 0.33.0 and version 0.50.0. This is a CWE-416 Use After Free vulnerability in the WebSocket Client\u0026apos;s shutdown_and_close function. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. The vulnerability impacts confidentiality, integrity, and availability.(CVE-2026-77358)","status":"published","published":"2026-09-14T16:34:30Z","modified":"2026-09-13T16:45:43.491075725Z","cvss":[{"version":"4.0","score":8.2,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"}],"updated_at":"2026-11-02T15:52:47.217107Z"},{"id":"OESA-2026-3961","title":"cpp-httplib security update","description":"A C++11 single-file header-only cross platform HTTP/HTTPS library. It\u0026amp;apos;s extremely easy to setup. Just include httplib.h file in your code!\r\n\r\nSecurity Fix(es):\n\nA vulnerability, classified as critical, has been found in yhirose cpp-httplib up to version 0.33.0 and version 0.50.0. This is a CWE-416 Use After Free vulnerability in the WebSocket Client\u0026apos;s shutdown_and_close function. Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code. The vulnerability impacts confidentiality, integrity, and availability.(CVE-2026-77358)","status":"published","published":"2026-09-20T13:23:36Z","modified":"2026-09-20T13:30:31.205980904Z","cvss":[{"version":"4.0","score":8.2,"vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","level":"high"}],"updated_at":"2026-11-02T15:52:47.643553Z"},{"id":"UBUNTU-CVE-2026-77358","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.","status":"published","published":"2026-08-28T00:18:00Z","modified":"2026-10-17T13:01:07.851242647Z","cvss":[{"version":"4.0","score":8.2,"vector":"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","level":"high"}],"updated_at":"2026-11-02T16:57:13.483205Z"},{"id":"openSUSE-SU-2026:11979-1","title":"ccache-4.14.1-1.1 on GA media","description":"These are all security issues fixed in the ccache-4.14.1-1.1 package on the GA media of openSUSE Tumbleweed.","status":"published","published":"2026-10-04T00:00:00Z","modified":"2026-10-05T10:15:27.890685423Z","updated_at":"2026-11-02T16:58:40.245664Z"}]}}
