Traefik's Eternal Wait: Bypassing TCP Timeouts with Postgres Magic Bytes
Vulnerability ID: CVE-2026-25949
CVSS Score: 7.5
Published: 2026-02-12
Traefik, the ubiquitous cloud-native edge router, has a nasty habit of trusting Postgres connections too early. CVE-2026-25949 allows an unauthenticated attacker to bypass configured read timeouts by initiating a Postgres STARTTLS handshake and then simply... stopping. By sending a specific 8-byte sequence, an attacker can trick Traefik into removing its safety deadlines, causing the server to hold the connection open indefinitely. A few thousand of these 'zombie' connections are enough to exhaust file descriptors and goroutines, effectively bricking the load balancer.
TL;DR
A Denial of Service (DoS) vulnerability exists in Traefik versions prior to 3.6.8. By sending a Postgres SSLRequest header (0x0000000804D2162F) and then stalling, an attacker can bypass the readTimeout setting. Traefik indefinitely waits for a TLS ClientHello that never comes, leading to resource exhaustion.
Technical Details
- CWE ID: CWE-400 (Uncontrolled Resource Consumption)
- Attack Vector: Network (Remote)
- CVSS v3.1: 7.5 (High)
- Impact: Denial of Service (DoS)
- Affected Protocol: TCP (Postgres STARTTLS)
- Patch Commit: 31e566e9f1d7888ccb6fbc18bfed427203c35678
Affected Systems
- Traefik Proxy (Versions < 3.6.8)
-
Traefik: < 3.6.8 (Fixed in:
3.6.8)
Code Analysis
Commit: 31e566e
Fix: postpone setting deadline for postgres starttls
pkg/server/router/tcp/router.go: - if err := conn.SetDeadline(time.Time{}); err != nil { ... }
Exploit Details
- Internal Research: The vulnerability is trivial to exploit using standard socket libraries by sending the Postgres SSLRequest prelude and pausing.
Mitigation Strategies
- Upgrade to Traefik v3.6.8 or later immediately.
- Implement
connection.maxLessHostto limit connections per IP. - Configure strict idle timeouts on upstream load balancers (AWS ALB/NLB, Cloudflare).
Remediation Steps:
- Pull the latest Traefik image:
docker pull traefik:v3.6.8. - Update your
docker-compose.ymlor Kubernetes manifests to use the new tag. - Redeploy the Traefik ingress controller.
- Verify the fix by attempting the PoC script against a staging environment.
References
- GHSA-89p3-4642-cr2w: Traefik Denial of Service via Postgres STARTTLS
- PostgreSQL Documentation: SSL Session Encryption
Read the full report for CVE-2026-25949 on our website for more details including interactive diagrams and full exploit analysis.
Top comments (0)