Summary
CVE-2026-124040 is a use-after-free vulnerability (CWE-416) in the HTTP/2 handling of CivetWeb through version 1.16. It affects builds compiled with USE_HTTP2 that run with enable_http2 turned on. The CVE record rates it CVSS v4.0 9.2 (Critical) and CVSS v3.1 8.1 (High).
Technical details
- Root cause:
handle_http2()retains freed:methodand:pathpointers. The stale pseudo-header state persists after the memory has been released. - Trigger conditions: The CivetWeb build must include HTTP/2 support (
USE_HTTP2) and theenable_http2option must be enabled. The CVE record rates attack complexity as high. - Attack vector: Network, with no authentication or user interaction required. An attacker sends subsequent HTTP/2 HEADERS frames that omit the
:methodand:pathpseudo-headers. - Impact: Per the CVE record, an attacker can manipulate the request method or path the server perceives. This can bypass access controls or crash the server. The CVSS vectors rate confidentiality, integrity and availability impact as High.
- Status of public details: The issue was reported upstream (GitHub issue #1379), where the reporter withheld technical details. No public exploit was identified during research.
Affected software
- CivetWeb, all versions through 1.16, when built with
USE_HTTP2and run withenable_http2on.
Severity
- CVSS v4.0: 9.2 (Critical),
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N - CVSS v3.1: 8.1 (High),
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate: Upgrade to a CivetWeb release newer than 1.16 once one containing a fix is available. The upstream issue did not show a confirmed fix when reviewed, so verify the fix status against the vendor repository.
- Workaround: Disable HTTP/2 by setting
enable_http2to off, or build withoutUSE_HTTP2. - Network mitigation: Where HTTP/2 cannot be disabled, restrict exposure of affected CivetWeb listeners, or place them behind a front-end proxy that terminates HTTP/2 itself.
- Identify embedded CivetWeb instances in your products and confirm whether HTTP/2 is enabled.

