CVE-2026-25949: Traefik's Eternal Wait: Bypassing TCP Timeouts with Postgres Magic Bytes
Source: Dev.to
Overview
Vulnerability ID: CVE-2026-25949
CVSS Score: 7.5 (High)
Published: 2026-02-12
CWE ID: CWE-400 (Uncontrolled Resource Consumption)
Attack Vector: Network (Remote)
Impact: Denial of Service (DoS)
Affected Protocol: TCP (Postgres STARTTLS)
Traefik, the cloud‑native edge router, trusts PostgreSQL connections too early. An unauthenticated attacker can bypass configured read timeouts by initiating a Postgres STARTTLS handshake and then stopping. By sending a specific 8‑byte sequence, the attacker forces Traefik to remove its safety deadlines, causing the server to keep the connection open indefinitely. A few thousand such “zombie” connections can exhaust file descriptors and goroutines, effectively bricking the load balancer.
Vulnerability Details
- Trigger: Send a Postgres SSLRequest header (
0x0000000804D2162F) and then stall. - Effect: Traefik indefinitely waits for a TLS
ClientHellothat never arrives, bypassing thereadTimeoutsetting. - Result: Resource exhaustion leading to a denial‑of‑service condition.
Affected Versions
| Product | Affected Versions | Fixed Version |
|---|---|---|
| Traefik Proxy | < 3.6.8 | 3.6.8 |
Patch
The fix postpones setting the deadline for Postgres STARTTLS connections.
// pkg/server/router/tcp/router.go
if err := conn.SetDeadline(time.Time{}); err != nil {
// handle error
}
- Patch Commit:
31e566e9f1d7888ccb6fbc18bfed427203c35678
Exploit Overview
The vulnerability is trivial to exploit with standard socket libraries:
- Open a TCP connection to the Traefik listener.
- Send the Postgres SSLRequest prelude (
0x0000000804D2162F). - Stop sending further data, causing Traefik to wait indefinitely.
Remediation Steps
- Upgrade Traefik to version
3.6.8or later.docker pull traefik:v3.6.8 - Update your
docker‑compose.ymlor Kubernetes manifests to reference the new image tag. - Redeploy the Traefik ingress controller.
- Verify the fix by running the PoC script against a staging environment and confirming that the connection is terminated after the configured timeout.
- (Optional) Implement
connection.maxLessHostto limit connections per IP. - Configure strict idle timeouts on upstream load balancers (e.g., AWS ALB/NLB, Cloudflare).
References
- GHSA-89p3-4642-cr2w: Traefik Denial of Service via Postgres STARTTLS
- PostgreSQL Documentation: SSL Session Encryption
- Full CVE‑2026‑25949 report (interactive diagrams and exploit analysis) – available on the vendor’s website.