Servers, proxies and network services

Apache HTTP Server security releases

mod_http2: CVE-2026-119618, unauthenticated RCE in HTTP/2 request handling

Apache HTTP Server 2.4.71, released 11 November 2026, fixes CVE-2026-119618, a critical (CVSS 3.1 9.8, CWE-362) flaw in mod_http2: two HTTP/2 worker threads can race on a connection-level memory allocator in assign_headers(), corrupting heap memory in a way public research says reliably leads to code execution. It was discovered by Anthropic's OSS Scanner and Google Cloud's Vulnerability Research team, and needs nothing beyond HTTP/2 being turned on: no authentication, no application behind the server, no specific request handler. Affected versions are httpd 2.4.55 through 2.4.70. The standalone mod_h2 project on GitHub, the same vulnerable code before it was merged into httpd itself, covers versions 2.0.8 through 2.0.42 and was archived by its owner on 9 June 2026; it has received no fix, and moving off it entirely is the only remedy for a site still using it.

Loading mod_http2 is not, by itself, enough to be exposed: Apache's own documentation says HTTP/2 must also be turned on with a Protocols directive naming h2 or h2c, at server level or inside a VirtualHost. Both conditions are common in practice, since several distributions' own "enable HTTP/2" instructions, and a2enmod http2's own shipped configuration on Debian and Ubuntu, set Protocols h2 h2c http/1.1 as part of turning the module on.

Red Hat's own httpd packaging for RHEL 9 and RHEL 10 allocates each HTTP/2 stream from a separate allocator, which Red Hat says substantially raises the bar to exploit this, without calling it fixed there. RHEL 8 and earlier ship no mod_http2 package at all, so they are unaffected for that reason, not because of a patch.

check and hunt change nothing and need no privilege. check reports the Apache version, whether mod_http2 is loaded (preferring the live module list from apache2ctl -M / apachectl -M when the server is running, falling back to the config files otherwise), and whether an active, uncommented Protocols directive anywhere in the config tree it walks offers h2 or h2c. hunt greps the error log for the worker-crash and APR allocator-corruption signatures public write-ups associate with this flaw; finding none is not proof nothing happened, since a successful exploit need not crash a worker or log anything. mitigate and rollback change the host and require root, stopping with a clear message (and a sudo suggestion) otherwise; mitigate --dry-run doesn't change anything and so doesn't require it. mitigate comments out every active LoadModule http2_module line and every active Protocols directive naming h2/h2c across the config tree (resolving Debian/Ubuntu's conf-enabled/mods-enabled symlinks to the real file first, so it edits conf-available/mods-available rather than silently turning a symlink into a plain file), backs up every file it touches, verifies the result with apache2ctl -t / apachectl -t, and rolls back automatically if the test fails. rollback restores every backed-up file. Neither command reloads the server unless you pass --reload (graceful, via systemctl reload where that unit exists, otherwise apache2ctl -k graceful); without it, reload the server yourself once you're satisfied with the result.

There is no configuration workaround that keeps HTTP/2 usable and closes this. The fix is upgrading to 2.4.71; mitigate is for buying time until you can, at the cost of dropping every client to HTTP/1.1.

Verified on Apache 2.4.58 (Ubuntu): with mod_http2 and Protocols h2 h2c http/1.1 both off, check reported CLEAR (exit 0); after a2enmod http2 plus a Protocols directive, it correctly reported EXPOSED (exit 1), finding the directive through both a conf file and a2enmod's own shipped mods-available/http2.conf. mitigate commented out all three directives, apache2ctl -t passed, and the re-check returned to CLEAR; rollback restored all three files to their original content and the exposed state returned exactly as before. A server with mod_http2 loaded but no matching Protocols directive is reported as undetermined, not clear, since this script's config-file walk is not a full guarantee of what an unusually structured include tree resolves to. A non-root user running mitigate or rollback is stopped with a clear message instead of a raw permission error; mitigate --reload and rollback --reload were each verified to actually reload a running Apache (starting it first when it wasn't running) and leave the server answering requests afterward.

mod_http2 quick start

  1. Download the script.

    curl -O https://codeberg.org/PrivacySafe/security-patches/raw/branch/main/apache/apache-mod-http2-check.sh
    chmod +x apache-mod-http2-check.sh
    
  2. Check whether you're exposed.

    ./apache-mod-http2-check.sh check
    
  3. If you can upgrade to 2.4.71, do that and skip the rest. If not, mitigate:

    sudo ./apache-mod-http2-check.sh mitigate --dry-run
    sudo ./apache-mod-http2-check.sh mitigate --reload
    
  4. Once you've upgraded, undo the mitigation:

    sudo ./apache-mod-http2-check.sh rollback --reload
    

mod_http2 commands

Command Changes the system? What it does
check no Version, module, and Protocols directive audit; exit 0 clear, 1 exposed, 2 undetermined
hunt no Greps the error log for crash/corruption signatures
mitigate [--dry-run] [--reload] yes (unless --dry-run) Comments out LoadModule http2_module and any Protocols h2/h2c line; backs up first, tests the config, rolls back on failure. --reload gracefully reloads the server afterward
rollback [--dry-run] [--reload] yes (unless --dry-run) Restores every file mitigate backed up; --dry-run lists what it would restore; --reload gracefully reloads the server afterward
rules no Prints the explanation above
version no Prints the script's version

Environment override: APACHE_HTTP2_FIXED (default 2.4.71) if you need to compare against a different fixed version, such as a vendor backport with its own numbering. PSF_BACKUP_DIR (default /var/backups/psf-security-patches/apache-mod-http2) to change where mitigate keeps its backups.

What this script can't see: a Protocols directive reached only through an Include this script's config-tree walk does not follow (it reads the standard Debian/Ubuntu and RHEL/Fedora/SUSE layouts directly, plus one level of symlink resolution, but does not recursively resolve arbitrary nested Include/IncludeOptional chains), and a server started with a non-standard -f/-d path. In either case check says the result is undetermined rather than reporting clear.

The Security Patches software and this documentation are dedicated to the public domain under CC0 1.0 Universal. Other pages on privacysafe.app/docs are CC BY-SA 4.0 unless the page says otherwise.

The PrivacySafe Ecosystem

Shop at Ivy Cyber

Ivy Cyber offers PrivacySafe products and services in the USA and has partnerships with 3NSoft in Canada and Kuip Limited in the European Union. Enterprise services and consulting are available at ivycyber.com

PrivacySafe Foundation is a 501(c)(3) nonprofit public charity that supports the development of the PrivacySafe applications, along with the components they rely upon: 3NWeb protocols, filesystem, documentation, and reference implementations.

PrivacySafe Foundation

Donations to PrivacySafe Foundation support education, research, documentation, and public code. Purchases from Ivy Cyber support PrivacySafe products, services, hosting, and technical support. Together, we're building a better web.