Disable HTTP/2 on OpenResty/nginx proxies (CVE-2026-123633, CVE-2026-123007) #708

Merged
greg merged 1 commits from security/disable-http2-nginx-cves into master 2026-11-23 17:52:46 +00:00
Owner

Why

On 2026-11-18 F5 published nginx 1.30.7 (stable) and 1.31.9 (mainline), fixing two unauthenticated remote code execution flaws that are reachable over HTTP/2 (see the nginx security advisories):

CVE Bug Vulnerable Fixed
CVE-2026-123007 Memory corruption in HTTP/2 flow control (exploitable when serving plain static files over TLS) 1.9.5 – 1.31.8 1.30.7 / 1.31.9
CVE-2026-123633 Use-after-free in HTTP/2 (needs reverse proxy plus connection pressure) 1.19.7 – 1.31.8 1.30.7 / 1.31.9
CVE-2026-123634 Use-after-free during response processing in the resolver 0.6.18 – 1.31.8 1.30.7 / 1.31.9
CVE-2026-121810 Use-after-free in HTTP/3 1.25.0 – 1.31.8 1.30.7 / 1.31.9
CVE-2026-113425 Use-after-free in the mail proxy module 0.5.33 – 1.31.8 1.30.7 / 1.31.9

The same release also fixes CVE-2026-118899 (infinite loop while reading a client request body over TLS 1.3), which affects all of our nginx/OpenResty hosts regardless of HTTP/2.

Exposure as verified on the live hosts (2026-11-18)

Host Engine HTTP/2 Affected
fornax (public) OpenResty 1.25.3.1, nginx core 1.25.3, Ubuntu 20.04 on for every vhost CVE-2026-123633, CVE-2026-123007
draco (public) OpenResty 1.25.3.1, nginx core 1.25.3, Ubuntu 20.04 on for every vhost CVE-2026-123633, CVE-2026-123007
bitcoin-2 (btcpay) nginx 1.19.1, Ubuntu 20.04 on (btcpay.kosmos.org) CVE-2026-123007 (1.19.1 predates 1.19.7, so not 123633)
wiki-1 nginx 1.19.1, Ubuntu 20.04 off none of the HTTP/2 flaws

Not applicable to our setup: CVE-2026-123634 (no resolver plus mirror configuration), CVE-2026-121810 (no HTTP/3/QUIC listeners) and CVE-2026-113425 (no mail {} proxy block).

What this PR does

It is a mitigation, not the fix. Since HTTP/2 is the attack surface, the http2 parameter is removed from all 56 listen directives in the 27 templates under site-cookbooks/*/templates. That covers every HTTPS vhost on both proxies as well as the btcpay and lndhub sites.

The change was converged to fornax, draco and bitcoin-2 and verified there:

  • nginx -t passes and nginx -T | grep -c http2 returns 0 on all three hosts.
  • openssl s_client -alpn h2,http/1.1 now negotiates http/1.1 for kosmos.org and gitea.kosmos.org.
  • Smoke test of 21 public vhosts (kosmos.org, accounts, api, assets, blossom, community, drone, gitea, ipfs, kosmos.social, kosmos.chat, kredits-github, lndhub, nostr, sockethub, storage, media, kosmos.cash, submit.nostr, btcpay) returns the expected status codes over HTTP/1.1, and the same vhosts were tested directly against fornax.
  • rsk.kosmos.org answers 502 because its upstream RSKJ mainnet node on 127.0.0.1:4444 is not running; the error log entries predate this change.

Disabling HTTP/2 costs browsers the multiplexing optimization, so it should not stay in place longer than necessary.

The actual fix: patching

HTTP/2 can only be turned back on once every endpoint runs an nginx core at or above 1.30.7 (stable) or 1.31.9 (mainline). Neither package source offers that for our hosts today:

  • openresty.org for focal tops out at 1.31.8.1, which still bundles bundle/nginx-1.31.8 (verifiable with tar tzf openresty-<version>.tar.gz | grep bundle/nginx-).
  • nginx.org for focal tops out at 1.27.5, because focal is no longer a supported distribution there.

Step 1: patch the OpenResty proxies (fornax, draco)

  1. Watch https://openresty.org/package/ubuntu/dists/focal/main/binary-amd64/Packages for an 1.31.9.x build and confirm its bundled core with apt-cache policy openresty and the tarball listing above.
  2. Test the upgrade in the development environment first. This is a jump from 1.25.3 to 1.31.x: LuaJIT, OpenSSL and the nginx core all change, and listen ... http2 has been deprecated since nginx 1.25.1, so the syntax will need to move to the http2 on; directive.
  3. Roll out with a full converge (knife zero converge -p2222 -a knife_zero.host name:fornax.kosmos.org), never with a reduced run list.
  4. Re-enable HTTP/2 by adding http2 on; to the server blocks and dropping the http2 parameter from listen permanently.
  5. Verify ALPN negotiates h2 again and run the vhost smoke test.

Step 2: patch the plain nginx hosts (bitcoin-2, wiki-1)

Both run Ubuntu 20.04, where nginx.org no longer ships current releases, so they cannot be patched in place:

  1. Upgrade these nodes to jammy or noble (Debian 12+ works too).
  2. Then bump the pinned version in site-cookbooks/kosmos-nginx/recipes/default.rb, which currently forces 1.19.1-1~<codename>, to 1.30.7 or newer, or move the repository to the stable branch.
  3. wiki-1 never had HTTP/2 enabled, so it was not exposed to the two RCE flaws, but it is exposed to CVE-2026-118899 and the other fixes in this release and should still be upgraded.

Step 3: clean up

Once both proxies and the btcpay vhost run fixed cores, revert this commit (or re-add http2 through the modern http2 on; directive). Keep the non-applicable configuration parts as they are: no resolver plus mirror combination, no HTTP/3 listeners and no mail proxy block.

  • OpenResty >= 1.31.9 core available and tested on the proxies
  • http2 on; re-enabled and verified via ALPN
  • bitcoin-2 and wiki-1 moved off focal and pinned to nginx >= 1.30.7
  • This mitigation reverted
## Why On 2026-11-18 F5 published nginx 1.30.7 (stable) and 1.31.9 (mainline), fixing two unauthenticated remote code execution flaws that are reachable over HTTP/2 (see the [nginx security advisories](https://nginx.org/en/security_advisories.html)): | CVE | Bug | Vulnerable | Fixed | | --- | --- | --- | --- | | CVE-2026-123007 | Memory corruption in HTTP/2 flow control (exploitable when serving plain static files over TLS) | 1.9.5 – 1.31.8 | 1.30.7 / 1.31.9 | | CVE-2026-123633 | Use-after-free in HTTP/2 (needs reverse proxy plus connection pressure) | 1.19.7 – 1.31.8 | 1.30.7 / 1.31.9 | | CVE-2026-123634 | Use-after-free during response processing in the resolver | 0.6.18 – 1.31.8 | 1.30.7 / 1.31.9 | | CVE-2026-121810 | Use-after-free in HTTP/3 | 1.25.0 – 1.31.8 | 1.30.7 / 1.31.9 | | CVE-2026-113425 | Use-after-free in the mail proxy module | 0.5.33 – 1.31.8 | 1.30.7 / 1.31.9 | The same release also fixes CVE-2026-118899 (infinite loop while reading a client request body over TLS 1.3), which affects all of our nginx/OpenResty hosts regardless of HTTP/2. ### Exposure as verified on the live hosts (2026-11-18) | Host | Engine | HTTP/2 | Affected | | --- | --- | --- | --- | | `fornax` (public) | OpenResty 1.25.3.1, nginx core 1.25.3, Ubuntu 20.04 | on for every vhost | CVE-2026-123633, CVE-2026-123007 | | `draco` (public) | OpenResty 1.25.3.1, nginx core 1.25.3, Ubuntu 20.04 | on for every vhost | CVE-2026-123633, CVE-2026-123007 | | `bitcoin-2` (btcpay) | nginx 1.19.1, Ubuntu 20.04 | on (`btcpay.kosmos.org`) | CVE-2026-123007 (1.19.1 predates 1.19.7, so not 123633) | | `wiki-1` | nginx 1.19.1, Ubuntu 20.04 | off | none of the HTTP/2 flaws | Not applicable to our setup: CVE-2026-123634 (no `resolver` plus `mirror` configuration), CVE-2026-121810 (no HTTP/3/QUIC listeners) and CVE-2026-113425 (no `mail {}` proxy block). ## What this PR does It is a **mitigation, not the fix**. Since HTTP/2 is the attack surface, the `http2` parameter is removed from all 56 `listen` directives in the 27 templates under `site-cookbooks/*/templates`. That covers every HTTPS vhost on both proxies as well as the btcpay and lndhub sites. The change was converged to `fornax`, `draco` and `bitcoin-2` and verified there: - `nginx -t` passes and `nginx -T | grep -c http2` returns 0 on all three hosts. - `openssl s_client -alpn h2,http/1.1` now negotiates `http/1.1` for `kosmos.org` and `gitea.kosmos.org`. - Smoke test of 21 public vhosts (kosmos.org, accounts, api, assets, blossom, community, drone, gitea, ipfs, kosmos.social, kosmos.chat, kredits-github, lndhub, nostr, sockethub, storage, media, kosmos.cash, submit.nostr, btcpay) returns the expected status codes over HTTP/1.1, and the same vhosts were tested directly against `fornax`. - `rsk.kosmos.org` answers 502 because its upstream RSKJ mainnet node on `127.0.0.1:4444` is not running; the error log entries predate this change. Disabling HTTP/2 costs browsers the multiplexing optimization, so it should not stay in place longer than necessary. ## The actual fix: patching HTTP/2 can only be turned back on once every endpoint runs an nginx core at or above 1.30.7 (stable) or 1.31.9 (mainline). Neither package source offers that for our hosts today: - openresty.org for focal tops out at **1.31.8.1**, which still bundles `bundle/nginx-1.31.8` (verifiable with `tar tzf openresty-<version>.tar.gz | grep bundle/nginx-`). - nginx.org for focal tops out at **1.27.5**, because focal is no longer a supported distribution there. ### Step 1: patch the OpenResty proxies (fornax, draco) 1. Watch <https://openresty.org/package/ubuntu/dists/focal/main/binary-amd64/Packages> for an **1.31.9.x** build and confirm its bundled core with `apt-cache policy openresty` and the tarball listing above. 2. Test the upgrade in the `development` environment first. This is a jump from 1.25.3 to 1.31.x: LuaJIT, OpenSSL and the nginx core all change, and `listen ... http2` has been deprecated since nginx 1.25.1, so the syntax will need to move to the `http2 on;` directive. 3. Roll out with a full converge (`knife zero converge -p2222 -a knife_zero.host name:fornax.kosmos.org`), never with a reduced run list. 4. Re-enable HTTP/2 by adding `http2 on;` to the `server` blocks and dropping the `http2` parameter from `listen` permanently. 5. Verify ALPN negotiates `h2` again and run the vhost smoke test. ### Step 2: patch the plain nginx hosts (bitcoin-2, wiki-1) Both run Ubuntu 20.04, where nginx.org no longer ships current releases, so they cannot be patched in place: 1. Upgrade these nodes to jammy or noble (Debian 12+ works too). 2. Then bump the pinned version in `site-cookbooks/kosmos-nginx/recipes/default.rb`, which currently forces `1.19.1-1~<codename>`, to **1.30.7 or newer**, or move the repository to the stable branch. 3. `wiki-1` never had HTTP/2 enabled, so it was not exposed to the two RCE flaws, but it is exposed to CVE-2026-118899 and the other fixes in this release and should still be upgraded. ### Step 3: clean up Once both proxies and the btcpay vhost run fixed cores, revert this commit (or re-add `http2` through the modern `http2 on;` directive). Keep the non-applicable configuration parts as they are: no `resolver` plus `mirror` combination, no HTTP/3 listeners and no mail proxy block. - [ ] OpenResty >= 1.31.9 core available and tested on the proxies - [ ] `http2 on;` re-enabled and verified via ALPN - [ ] bitcoin-2 and wiki-1 moved off focal and pinned to nginx >= 1.30.7 - [ ] This mitigation reverted
raucao added 1 commit 2026-11-18 20:16:26 +00:00
The November 2026 nginx security release fixes two unauthenticated RCE
flaws reachable over HTTP/2: CVE-2026-123633 (HTTP/2 use-after-free,
vulnerable 1.19.7-1.31.8) and CVE-2026-123007 (HTTP/2 flow control
memory corruption, vulnerable 1.9.5-1.31.8). Fixes are in nginx 1.30.7
(stable) and 1.31.9 (mainline).

Neither of our proxies can be patched yet: OpenResty 1.25.3.1 runs an
nginx 1.25.3 core, and the newest OpenResty build in the apt repo
(1.31.8.1) still bundles nginx 1.31.8. The nginx.org apt repo has no
fixed package for Ubuntu focal either.

As a temporary mitigation, drop the http2 parameter from every listen
directive so the proxies no longer negotiate HTTP/2. Re-enable with
"http2 on;" in the server blocks once OpenResty ships an nginx 1.31.9
(or newer) core.
raucao requested review from greg 2026-11-23 17:26:07 +00:00
raucao added the kredits-1securityops labels 2026-11-23 17:26:19 +00:00
greg approved these changes 2026-11-23 17:51:19 +00:00
greg left a comment
Owner

👍

👍
greg merged commit 3a3d23ea09 into master 2026-11-23 17:52:46 +00:00
greg deleted branch security/disable-http2-nginx-cves 2026-11-23 17:52:47 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kosmos/chef#708