Describe the bug
The recent security patches in v5.0.3 (GHSA-xg2q-62g2-cvcm / GHSA-3q28-qjrv-qr39) introduced strict enforcement of X-Forwarded-* headers, explicitly rejecting requests with empty or missing X-Forwarded-Uri headers. This completely breaks the /api/auth/nginx endpoint for Kubernetes users who are still one the NGINX Ingress Controller (ingress-nginx).
During an auth_request subrequest, NGINX natively sends X-Original-URI and X-Original-URL, not X-Forwarded-Uri. Because snippet annotations are disabled by default in modern ingress-nginx controllers for security reasons (CVE-2021-25742), users cannot use auth-snippet to manually inject the required X-Forwarded-Uri header, leaving them hard-blocked.
To Reproduce
Steps to reproduce the behavior:
- Deploy Tinyauth v5.0.3 on a Kubernetes cluster using
ingress-nginx.
- Protect an application using standard NGINX annotations (setting
auth-url to http://<tinyauth>/api/auth/nginx).
- Attempt to access the protected application in a browser.
- See
400 Bad Request from the protected app.
Expected behavior
The /api/auth/nginx endpoint should either natively parse and accept NGINX's default X-Original-URI header, or not immediately reject the request when X-Forwarded-Uri is missing on this specific endpoint.
Logs
2026-03-11T19:26:32.015071502Z 2026-03-11T19:26:32Z ERR internal/controller/proxy_controller.go:339 > Header not found header=x-forwarded-uri log_stream=app
2026-03-11T19:26:32.015118142Z 2026-03-11T19:26:32Z WRN internal/middleware/zerolog_middleware.go:62 > Client Error address=10.0.132.34:50242 client_ip=2a01:599:c04:4d2a:b942:d76:62bb:8614 latency="194.082µs" log_stream=http method=GET path=/api/auth/nginx status=400
2026-03-11T19:26:33.545161041Z 2026-03-11T19:26:33Z ERR internal/controller/proxy_controller.go:339 > Header not found header=x-forwarded-uri log_stream=app
Device (please complete the following information):
- OS: Kubernetes (Talos Linux)
- Browser: Any
- Tinyauth: v5.0.3
- Docker: containerd
Additional context
The only workaround right now is to either downgrade to v5.0.2 or deploy a dedicated header-translation reverse proxy next to Tinyauth. Modifying the global ingress controller to allow-snippet-annotations: "true" is a severe security risk in multi-tenant clusters, so a native fix in Tinyauth's NGINX endpoint logic is needed.
Describe the bug
The recent security patches in v5.0.3 (GHSA-xg2q-62g2-cvcm / GHSA-3q28-qjrv-qr39) introduced strict enforcement of
X-Forwarded-*headers, explicitly rejecting requests with empty or missingX-Forwarded-Uriheaders. This completely breaks the/api/auth/nginxendpoint for Kubernetes users who are still one the NGINX Ingress Controller (ingress-nginx).During an
auth_requestsubrequest, NGINX natively sendsX-Original-URIandX-Original-URL, notX-Forwarded-Uri. Because snippet annotations are disabled by default in moderningress-nginxcontrollers for security reasons (CVE-2021-25742), users cannot useauth-snippetto manually inject the requiredX-Forwarded-Uriheader, leaving them hard-blocked.To Reproduce
Steps to reproduce the behavior:
ingress-nginx.auth-urltohttp://<tinyauth>/api/auth/nginx).400 Bad Requestfrom the protected app.Expected behavior
The
/api/auth/nginxendpoint should either natively parse and accept NGINX's defaultX-Original-URIheader, or not immediately reject the request whenX-Forwarded-Uriis missing on this specific endpoint.Logs
Device (please complete the following information):
Additional context
The only workaround right now is to either downgrade to v5.0.2 or deploy a dedicated header-translation reverse proxy next to Tinyauth. Modifying the global ingress controller to
allow-snippet-annotations: "true"is a severe security risk in multi-tenant clusters, so a native fix in Tinyauth's NGINX endpoint logic is needed.