Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-41181 — traefik

🟡 CVSS 5.8 — Medium ✅ No Known Exploit NVD
5.8
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Traefik's errors middleware forwards Authorization and Cookie headers to separate error page service

Summary

There is a medium severity information disclosure vulnerability in Traefik's errors (custom error pages) middleware. When the backend returns a response matching the configured status range, the middleware forwards the original request's complete header set, including Authorization, Cookie, and other authentication material, to the separate error page service rather than only the minimal context needed to render the error page. This behavior is undocumented: the documentation states only that Host is forwarded by default, so operators are not warned that sensitive credentials are shared across service boundaries. Deployments using the errors middleware with a distinct error page service may inadvertently expose end-user credentials to infrastructure that was not intended to receive them.

Patches

  • https://github.com/traefik/traefik/releases/tag/v2.11.44
  • https://github.com/traefik/traefik/releases/tag/v3.6.15
  • https://github.com/traefik/traefik/releases/tag/v3.7.0-rc.3

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>

Description

Traefik v3.6.13's supported HTTP errors middleware discloses sensitive request headers to the configured error page service when the original backend response matches the configured status range and the middleware takes its default header-forwarding path. In the reproduced configuration, the business router audit-customerrors@docker pointed to backend service audit-backend, attached middleware audit-leak@docker, and the middleware was configured with errors.status=500-599, errors.service=audit-error, and errors.query=/collect. A request to the business route caused the backend to return 500, after which Traefik created a secondary request to the error service and copied the original Authorization and Cookie headers into that cross-service request.

This is a normal feature path on an ordinary HTTP route. It does not depend on api.insecure, the dashboard, pprof, or a debug-only mode. The confidentiality boundary that breaks here is the service boundary between the original backend chain and the separate error page service: credentials that were only meant for the original backend are automatically delivered to another service.

The root cause is in pkg/middlewares/customerrors/custom_errors.go:151-160:

```go

if len(c.forwardNginxHeaders) > 0 {

utils.CopyHeaders(pageReq.Header, c.forwardNginxHeaders)

pageReq.Header.Set("X-Code", strconv.Itoa(code))

pageReq.Header.Set("X-Format", req.Header.Get("Accept"))

pageReq.Header.Set("X-Original-Uri", req.URL.RequestURI())

} else {

utils.CopyHeaders(pageReq.Header, req.Header)

}

```

Unless the NginxHeaders branch is explicitly used, the middleware copies the entire original request header map into the error page request. The documentation at docs/content/reference/routing-configuration/http/middlewares/errorpages.md:103-107 only states that Host is forwarded by default, so operators are not warned that Authorization, Cookie, and other authentication material are forwarded as well.

Steps To Reproduce

1. Deploy Traefik v3.6.13 with a normal business route that uses the supported errors middleware and points errors.service to a distinct service. The attached PoC uses BASE_URL = "http://127.0.0.1:28080", API_BASE_URL = "http://127.0.0.1:28180", ROUTER_PATH = "/audit-customerrors", AUTHORIZATION = "Bearer audit-secret-token", and COOKIE = "sessionid=audit-cookie; theme=dark".

2. Start the two attached helper services customerrors_backend.py and customerrors_error.py. The backend listens on port 8000 and always returns 500. The error service listens on port 8000 and returns the request method, path, and received headers as JSON. The PoC starts them with the router and middleware labels below so that the business request is handled by the backend, while the error page is fetched from the separate error service:

```text

traefik.http.routers.audit-customerrors.rule=PathPrefix(/audit-customerrors)

traefik.http.routers.audit-customerrors.entrypoints=web

traefik.http.routers.audit-customerrors.priority=100

traefik.http.routers.audit-customerrors.service=audit-backend

traefik.http.routers.audit-customerrors.middlewares=audit-leak

traefik.http.services.audit-backend.loadbalancer.server.port=8000

traefik.http.middlewares.audit-leak.errors.status=500-599

traefik.http.middlewares.audit-leak.errors.service=audit-error

traefik.http.middlewares.audit-leak.errors.query=/collect

```

3. Confirm that Traefik has loaded the route and middleware. The attached customerrors_router.json shows that audit-customerrors@docker uses middleware audit-leak@docker, and the attached `customerrors_middlewa

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs no privileges on the target. No user interaction is required. The scope is changed, meaning a successful attack can affect components beyond the vulnerable one. Rated impact: confidentiality low, integrity none, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: None — an unauthenticated stranger can try it.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Changed — a successful attack reaches components beyond the vulnerable one.
  • Confidentiality impact: Low — limited, and the attacker does not choose what is affected.
  • Integrity impact: None.
  • Availability impact: None.

Affected software

CVE-2026-41181 is recorded against 4 packages.

  • github.com/traefik/traefik
  • github.com/traefik/traefik/v2
  • github.com/traefik/traefik/v3
  • traefik

Timeline and source

Published on 11 August 2026. No public exploit is currently recorded for this entry. A vendor advisory or fix has been published. Record sourced from NVD.

References

github.com (Advisory)
github.com (Web)
github.com (Web)
github.com (Web)

Other advisories for this package

github.com/traefik/traefik has other advisories on record. If you are patching this one, these are worth checking on the same host:

Details

Severity Medium
CVSS Score 5.8
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N
CWE N/A
Public Exploit ✅ No
Source NVD
Published 2026-08-11
Updated 2026-08-20
Modified 2026-08-11

Affected Packages

Software From version Fixed in
github.com/traefik/traefik
github.com/traefik/traefik/v2
github.com/traefik/traefik/v3
traefik

Similar Threats

Vulnerability Monitoring

Track new vulnerabilities in traefik

CVE-2026-41181 is rated CVSS 5.8 Medium. BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026