{"answers":{"affected":"","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-77358 exists.","fix":"Upgrade to a fixed version.","what":"CVE-2026-77358 is a high-severity use after free vulnerability in yhirose cpp-httplib, published on 27 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-77358 and fix it if it is affected.\n\nWhat it is: CVE-2026-77358 is a high-severity use after free vulnerability in yhirose cpp-httplib, published on 27 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-77358 exists.\n\nAffected product: yhirose cpp-httplib. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-77358/ (Markdown: https://insights.sbomify.com/CVE-2026-77358/index.md)","id":"CVE-2026-77358","markdown":"https://insights.sbomify.com/CVE-2026-77358/index.md","name":"CVE-2026-77358","record":{"aliases":["DEBIAN-CVE-2026-77358","GHSA-w7p7-f35j-mw7q","OESA-2026-3800","OESA-2026-3801","OESA-2026-3961","UBUNTU-CVE-2026-77358"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","denial_of_service"],"network_reachable":"yes","non_default_config":false,"product_category":"C++ HTTP library","requires_auth":"none","summary":"A use-after-free in cpp-httplib's TLS WebSocket client allows attackers to cause crashes or potentially execute code during connection teardown.","user_interaction":"not_required","vuln_class":"use_after_free"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":8.2,"severity":"high","source":"cna","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","version":"4.0"},"cwes":[{"id":"CWE-416","name":"Use After Free"}],"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.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"cpp-httplib: Use-after-free of TLS session in WebSocketClient::shutdown_and_close()","id":"CVE-2026-77358","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":"use_after_free","year":"2026"},"n_packages":0,"n_references":2,"next":{"headline":"oRPC: Vary Header Injection in CORS Plugin leading to potential Cache/CORS Bypass","id":"CVE-2026-77360"},"packages":[],"prev":{"headline":"Mesop: DoS in /hot-reload endpoint allows unauthenticated attacker to exhaust worker threads and crash the server","id":"CVE-2026-77357"},"products":["cpp-httplib"],"published":"2026-08-27","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-08-31","vendors":["yhirose"]},"summary":"A use-after-free in cpp-httplib's TLS WebSocket client allows attackers to cause crashes or potentially execute code during connection teardown.","url":"https://insights.sbomify.com/CVE-2026-77358/"}