Skip to content

fix(nginx-proxy): update nginx to 1.31.8 for the 1.31.7 security fixes - #379

Open
mrrobot47 wants to merge 1 commit into
EasyEngine:developfrom
mrrobot47:fix/nginx-proxy-nginx-1.31.8
Open

mrrobot47 wants to merge 1 commit into
EasyEngine:developfrom
mrrobot47:fix/nginx-proxy-nginx-1.31.8

Conversation

@mrrobot47

@mrrobot47 mrrobot47 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

jwilder/nginx-proxy:1.11.6 (2026-07-16) is still the latest nginx-proxy release, and it ships nginx 1.31.3. Upstream main is on 1.31.6 and the 1.31.7/1.31.8 bumps are still open there, so no release has the fixes yet.

nginx security fixes since 1.31.3 (https://nginx.org/en/CHANGES):

The apt-get upgrade from #369 doesn't reach nginx because the official nginx image removes its nginx.org apt source. This re-adds the source (signed by the keyring the base image keeps), installs the same pinned set as the official nginx:1.31.8 image (nginx 1.31.8 with xslt, geoip, image-filter, njs 1.0.2 and acme 0.4.1 modules), and removes the source again. NGINX_VERSION/NJS_VERSION are updated so the image env matches what's installed.

Once an nginx-proxy release ships nginx 1.31.8 or newer, bump the FROM and drop this block. With a newer nginx in the base, the pinned install fails instead of downgrading.

Testing

  • Built locally: nginx -v 1.31.8 (develop builds 1.31.3), the same configure arguments as before plus 1.31.8's new built-ins, nginx -t passes, our nginx.conf is unchanged after the upgrade, apt list --upgradable is empty and no nginx.org source is left in the image.
  • Debian 13.7, OpenSSL 3.5.7, htpasswd, docker-gen 0.17.2 and forego present, /version.conf unchanged; the default page is served with X-Powered-By: EasyEngine v4.
  • Full entrypoint with the Docker socket mounted: docker-gen renders nginx.tmpl for a backend with VIRTUAL_HOST=smoke.test, nginx -t passes, and a request with Host: smoke.test through the proxy reaches the backend.
  • The nginx.org packages exist at these versions for arm64 too, so this works with the multi-arch build in feat: build and publish every image for linux/amd64 and linux/arm64 #373.

Summary by CodeRabbit

  • Updates
    • The proxy container now uses pinned NGINX and NJS versions, improving consistency across builds.
    • The container includes additional web server utilities and NGINX modules.

jwilder/nginx-proxy 1.11.6 is still the latest nginx-proxy release and ships nginx 1.31.3. nginx 1.31.6 and 1.31.7 fixed six CVEs since then, among them CVE-2026-93479, a buffer overflow while evaluating string expressions with variables, which covers the variable-based vhost log_format every proxied site uses. The build-time apt-get upgrade can't pick up nginx because the official nginx image removes its nginx.org apt source.

Re-add the nginx.org mainline source after the Debian upgrade, install the same pinned package set as the official nginx:1.31.8 image (nginx and its xslt, geoip, image-filter, njs and acme modules), and remove the source again. Drop this once an nginx-proxy release ships nginx 1.31.8 or newer; a newer base makes the pinned install fail instead of downgrading.
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: NGINX package installation

Layer / File(s) Summary
Repository setup and package installation
nginx-proxy/Dockerfile
The Dockerfile defines NGINX and NJS versions, adds the nginx.org Debian mainline repository, installs NGINX and its listed modules at specified versions, and removes apt lists and repository configuration.

Suggested reviewers: jeffreyvdhondel

Change: Other

Merge Risk: Minimal · up to baf93

This change updates the proxy image to nginx 1.31.8 by temporarily installing pinned packages from nginx.org and then removing that source. No concrete merge-blocking problem was found. The author documents that the block should be removed once the base image ships nginx 1.31.8 or newer.

Architecture risk: Low · up to baf93

The change affects 1 system.

Changed systems: nginx-proxy

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — nginx-proxy (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in nginx-proxy/Dockerfile: Adds comments describing the temporary NGINX package override and version variables NGINX_VERSION=1.31.8 and NJS_VERSION=1.0.2.
  • observed — Modified behavior in nginx-proxy/Dockerfile: Expands the existing apt update/upgrade and apache2-utils installation step to add the nginx.org mainline Debian repository, update apt metadata, install NGINX and the listed modules at versions derived from the environment variables and package-release variables, and remove apt lists and repository configuration. Previously, the step only updated and upgraded packages, installed apache2-utils, and removed apt lists.
Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0ad85502-e436-4a57-b59d-2ba255e8ac91
Commits

Reviewing files that changed from the base of the PR and between e9d44f7 and baf9396.

Files selected for processing: 1

  • nginx-proxy/Dockerfile

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant