Nginx, Caddy, or Traefik: What to Choose and How Safe Modern Web Servers Are

Choosing a reverse proxy is rarely about which binary serves an empty 200 OK fastest in a lab. What matters in production is how predictable the server is under real traffic, how easy it is to misconfigure, and what happens when a protocol parser breaks.
On November 18, 2026, the Nginx project shipped emergency updates fixing ten security vulnerabilities—five of which researchers grouped under the name Nginx2Root. Around the same time, popular Go-based alternatives Caddy and Traefik also released critical security patches. It is a good moment to look past the hype, compare their real threat models, and clarify how to pick the right proxy for your stack.
What Happened to Nginx: Inside Nginx2Root
Releases 1.30.7 (stable) and 1.31.9 (mainline) patched a cluster of memory-safety flaws, led by CVE-2026-123007 (CVSS 9.2). The bug lived in Nginx's HTTP/2 flow-control accounting for over a decade, dating back to version 1.9.5.
The failure mode is classic C: when an HTTP/2 stream is canceled, Nginx incorrectly refunded queued bytes back to the connection's send window without proper upper-bound validation. With a crafted sequence of frames, the counter could overflow, leading to heap buffer corruption, worker crashes, or remote code execution (RCE). Crucially, no backend application needs to be involved—merely accepting HTTP/2 connections (even for static files over TLS) exposes the code path.
The same advisory bundle also addressed:
- CVE-2026-123633 — a use-after-free during upstream connection draining;
- CVE-2026-121810 — memory corruption in the HTTP/3 (QUIC) stack;
- CVE-2026-123634 — a flaw triggered when proxied server names use variables alongside SSI or mirroring.
How to Check and Patch Your Servers
Start by checking the installed binary version and scanning your active configuration for HTTP/2 directives:
nginx -v
nginx -T 2>/dev/null | grep -nE 'http2|listen.*http2'
Inspect any matches manually: modern Nginx enables the protocol via a standalone http2 on; directive, whereas older configs embed http2 inside listen.
Upgrade and restart the service so running worker processes load the patched binary:
sudo apt update && sudo apt install --only-upgrade nginx
sudo systemctl restart nginx
For Docker deployments:
docker compose pull && docker compose up -d --force-recreate
If you rely on Ubuntu, Debian, or RHEL packages, do not judge patch status solely by
nginx -v. Distribution maintainers frequently backport security fixes into older version numbers—always check your distro's security advisory.
As a short-term stopgap before patching, you can disable HTTP/2 (http2 off; or remove http2 from listen), provided you do not serve gRPC. Keep in mind this does not mitigate upstream or QUIC flaws.
How Safe Are Go Alternatives: Caddy and Traefik
Whenever a memory-corruption bug hits a C daemon, teams naturally consider migrating to Caddy or Traefik. Both are written in Go, which provides garbage collection and bounds checking, effectively eliminating classic heap overflows and use-after-free RCEs.
Memory safety, however, is not the same as bug immunity. In November 2026, both projects shipped important security fixes of their own.
Caddy (Patched in 2.11.9)
Caddy's core strength is safe defaults with minimal boilerplate. A production-ready reverse proxy with automatic TLS issuance and renewal takes three lines:
example.com {
reverse_proxy localhost:3000
}
Caddy enables HTTP/1.1, HTTP/2, and HTTP/3 out of the box while keeping memory usage low. Even so, its November 2026 advisories covered several logic and parsing flaws:
- GHSA-q34h-28rj-5hjm — client request headers could override sensitive internal
HTTP_*environment variables infastcgi/php_fastcgi; - an HTTP/2
:authorityvs.Hostmismatch that could route requests inconsistently; - a shared TLS policy bug where reusing a policy across site blocks on the same host could silently drop
client_auth(mTLS) enforcement.
Traefik (Patched in 3.7.18 and 2.11.62)
Traefik is built for dynamic infrastructure—Docker, Swarm, and Kubernetes—where routes are discovered automatically via container labels:
services:
app:
image: my-app
labels:
- "traefik.enable=true"
- "traefik.http.routers.app.rule=Host(`example.com`)"
- "traefik.http.routers.app.entrypoints=websecure"
That rich middleware and service-discovery surface introduces different failure modes. In late 2026, Traefik patched:
- CVE-2026-121966 — connection-pool reuse leaking NTLM/Negotiate authentication state across clients in
ForwardAuth/FastProxysetups; - CVE-2026-119572 — mTLS bypasses when overlapping router rules (such as negated
!Host()matchers) fell back to default TLS options.
Go removes memory-corruption exploits, but header-trust mistakes, path-matching edge cases, and TLS policy fallbacks can be just as damaging.
Performance: Why Synthetic RPS Charts Mislead
Nginx remains the benchmark for peak throughput and tail-latency stability under heavy load. Its event-driven architecture without garbage collection pauses squeezes maximum capacity out of each CPU core.
In Anton Putra's benchmarks, a tuned Nginx setup outperformed Caddy at saturation (~22,000 RPS vs. 10,000 RPS for static files, and ~27,000 vs. 14,000 RPS as a reverse proxy) with steadier P95/P99 latency.
In most production environments, however, the bottleneck is configuration rather than the proxy binary itself. Deployn's 2026 reverse proxy benchmark highlights why:
- TLS key type skews results more than proxy choice. In initial 4-vCPU TLS handshake tests, Traefik managed ~600 new connections/sec while Caddy hit 4,740. The culprit was certificate type: Traefik used RSA 4096 while Caddy defaulted to ECDSA P-256. Switching both to ECDSA P-256 pushed Traefik to ~5,900 handshakes/sec.
- At moderate load, latency is nearly identical. At a steady 1,500 RPS, both Caddy and Traefik held P95 latency around 1.2–1.3 ms.
- Memory footprint still differs. Idle RAM sat around 13 MB for Caddy versus 22 MB for Traefik, widening under load.
If your service handles hundreds or a few thousand requests per second, enabling upstream keepalive pools and using ECDSA P-256 certificates will deliver a far bigger win than switching proxy engines.
Choosing the Right Proxy for Your Stack
| Criterion | Nginx | Caddy | Traefik |
|---|---|---|---|
| Language & risk profile | C (memory safety, parsers) | Go (routing & path logic) | Go (middleware, pools, labels) |
| TLS management | Manual / Certbot / ACME | Automatic out of the box | Automatic (ACME) |
| Configuration style | Imperative, granular control | Concise, safe defaults | Declarative via Docker/K8s |
| Memory footprint | Minimal | Low (~13 MB idle) | Moderate (~22+ MB idle) |
| Best fit | Peak RPS, caching, static assets | Fast setup, zero-ops HTTPS | Dynamic containers & K8s |
Practical Decision Checklist
- Stay on Nginx if you already have a working setup, rely on granular caching or static-file delivery, need maximum throughput, and your team knows how to tune it. Automate security patching and keep worker processes restarted on upgrades.
- Pick Caddy if you are launching a new site or small-to-mid-sized service on a VPS and want automatic HTTPS without maintaining Certbot cron jobs or hundreds of lines of boilerplate.
- Pick Traefik if containers are constantly created, destroyed, and scaled in Docker Compose, Swarm, or Kubernetes, and you want routing rules to live right next to your service definitions.
No web server is immune to vulnerabilities. Production resilience comes from keeping your configuration surface small, isolating the proxy process from the host, and applying security updates on release day rather than months later.
Frequently asked questions
Are Caddy and Traefik automatically safer than Nginx because they are written in Go?
Go eliminates an entire class of manual memory-management bugs (buffer overflows, use-after-free) like the ones behind Nginx2Root in November 2026. However, Go does not prevent logic bugs: in the same month, both Caddy and Traefik shipped patches for mTLS enforcement drops, FastCGI variable overrides, and connection-pool identity leaks.
Which Nginx versions fix the Nginx2Root vulnerabilities?
The fixes landed in official Nginx 1.30.7 (stable) and 1.31.9 (mainline), released on November 18, 2026. If you install Nginx from Linux distribution repositories (Ubuntu, Debian, RHEL), check your vendor's security advisory—maintainers often backport fixes without bumping the upstream minor version.
Is disabling HTTP/2 enough as a temporary mitigation?
Disabling HTTP/2 (http2 off;) blocks the primary CVE-2026-123007 exploit path, but it does not address the other advisories in the release (such as upstream connection-draining or QUIC/HTTP/3 bugs) and breaks gRPC traffic. Treat it strictly as a short-term stopgap until you patch.
Why do reverse proxy benchmarks vary so wildly for the same tool?
Synthetic RPS numbers are heavily skewed by TLS key types and connection reuse. In TLS handshake tests, switching from RSA 4096 to ECDSA P-256 can multiply handshakes per second and completely flip the leaderboard.



