On November 18 nginx published a batch of security fixes, headed by two HTTP/2 bugs rated CVSS 9.2:
memory corruption in HTTP/2 flow control (CVE-2026-123007) and a use-after-free when HTTP/2 is used
with proxying (CVE-2026-123633). Wiz showed unauthenticated remote code execution
against a default HTTPS + HTTP/2 setup. Everything up to nginx 1.31.8 is affected; 1.31.9 and 1.30.7 are fixed.
If you build on OpenResty, there's a catch: the current release, 1.31.8.1, bundles nginx 1.31.8,
and there is no patched OpenResty release yet. That's our situation with
Corvus, an open-source gateway built on OpenResty. This is
what we did, so you can do the same for your own OpenResty builds.
1. Check what actually applies to you
The advisory list for that day has more than ten
entries. Not all of them matter for every build, so we checked each one against our ./configure
flags and templates:
| Advisory | Our build |
|---|---|
| HTTP/2 flow control, HTTP/2 use-after-free | affected: http2 on on HTTPS hosts |
| resolver use-after-free | affected: upstream names are resolved at request time (resolve) |
| request body over TLS 1.3 (infinite loop) | affected: HTTPS |
| PROXY protocol v2 | affected when PROXY protocol listeners are enabled |
stream SSL / ssl_preread | compiled in |
| mail proxy, HTTP/3 | not affected: not compiled in (--without-mail_*, no QUIC) |
Small reminder that compiling out what you don't use (mail, HTTP/3, SSI, …) is cheap insurance: two
of the "major" entries simply didn't apply.
2. Take the whole upstream diff, not hand-picked commits
nginx 1.31.9 is 40 commits on top of 1.31.8, with the security fixes spread among them. Cherry-picking
"just the CVE commits" risks missing a prerequisite. What nginx tested and shipped as 1.31.9 is the
whole diff, so we took that, limited to the source tree:
git clone https://github.com/nginx/nginx && cd nginx git diff release-1.31.8 release-1.31.9 -- src/ ':!src/core/nginx.h' > nginx-1.31.9-security.patch nginx.h is excluded on purpose: it only bumps the version, and OpenResty patches that file for its
own version string.
Then check it against the exact tarball you build from (same SHA-256 you already pin):
tar xzf openresty-1.31.8.1.tar.gz cd openresty-1.31.8.1/bundle/nginx-1.31.8 patch -p1 --dry-run < nginx-1.31.9-security.patch All 34 files applied with line offsets only: no fuzz, no rejects.
3. Make the build fail loudly instead of silently
In the build script, right after unpacking OpenResty:
patch -d bundle/nginx-1.31.8 -p1 --forward --no-backup-if-mismatch \ < /patches/nginx-1.31.9-security.patch Two properties we wanted:
- It must apply or the build stops.
set -epluspatchreturning non-zero on any reject. - It must not outlive its purpose. The path contains
nginx-1.31.8. When we move to an OpenResty release on a newer nginx, the directory no longer exists and the build fails, so nobody can bump the version and forget the patch.
The patch file is committed to the repository so anyone can review exactly what changed, and
our release images are signed with build provenance, so users can verify they run what the
repository says.
Then the usual gate: our CI builds the image and runs the full integration suite (~300 checks against
a running gateway: proxying, TLS, rules, bans, the waiting room) before anything can merge. From advisory to a
signed release: about a day.
If you can't rebuild today, turn HTTP/2 off on the affected servers (http2 off;, or remove
http2 from listen). It avoids the two HTTP/2 issues at the cost of a little latency.
4. The bug that hid our update checks
While doing this we noticed something embarrassing. We have a scheduled CI job that compares the
versions pinned in our build script (OpenResty, OpenSSL, PCRE2, zlib) with the newest upstream
releases and opens an issue when one is out of date. Dependabot doesn't track source tarballs, so this
job is the only thing watching them.
It turned out zlib 1.4, which fixes several memory-safety bugs, had been out for two weeks, and no
issue had ever been opened. The job looked like this:
set +e sh check-upstream.sh | tee upstream.txt echo "stale=$?" >> "$GITHUB_OUTPUT" check-upstream.sh exits 1 when something is stale. But $? after a pipeline is the status of the
last command, tee, which always succeeds. GitHub Actions' default bash shell doesn't set
pipefail. So stale was always 0, the "open an issue" step was always skipped, and the job was
green every week while doing nothing.
The fix is boring:
sh check-upstream.sh > upstream.txt rc=$? cat upstream.txt echo "stale=$rc" >> "$GITHUB_OUTPUT" (set -o pipefail or ${PIPESTATUS[0]} work too.) The first manual run opened the zlib issue
immediately; we shipped zlib 1.4 the same day. We also moved the check from weekly to daily, since
"a patched OpenResty is out" is exactly the kind of thing you want to know the next morning, and the
issue it opens now reminds us to delete the temporary nginx patch.
If you have a "monitoring" job that has never once alerted, it's worth checking whether it can.
Takeaways
- Check advisories against your actual build flags and configs; compiled-out modules are free wins.
- When your distribution lags, the upstream release diff is a safer unit than hand-picked commits.
- Make temporary patches fail the build when they stop applying, and tie them to the version they fix.
-
cmd | tee file; echo $?reportstee. Test your alerting by forcing the alert once.
Corvus is an open-source (Apache-2.0) reverse proxy with a web console, WAF rules, automatic bans and
a waiting room, in one container. The build script and the patch are in the
repository (deploy/openresty/).

