Skip to content

Traefik: tcp router clears read deadlines before tls forwarding, enabling stalled handshakes (Slowloris DOS)

High severity GitHub Reviewed Published Mar 4, 2026 in traefik/traefik • Updated Mar 5, 2026

Package

gomod github.com/traefik/traefik/v2 (Go)

Affected versions

<= 2.11.37

Patched versions

2.11.38
gomod github.com/traefik/traefik/v3 (Go)
<= 3.6.8
3.6.9

Description

Impact

There is a potential vulnerability in Traefik managing TLS handshake on TCP routers.

When Traefik processes a TLS connection on a TCP router, the read deadline used to bound protocol sniffing is cleared before the TLS handshake is completed. When a TLS handshake read error occurs, the code attempts a second handshake with different connection parameters, silently ignoring the initial error. A remote unauthenticated client can exploit this by sending an incomplete TLS record and stopping further data transmission, causing the TLS handshake to stall indefinitely and holding connections open.

By opening many such stalled connections in parallel, an attacker can exhaust file descriptors and goroutines, degrading availability of all services on the affected entrypoint.

Patches

Workarounds

No workaround available.

For more information

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


Original Description

Traefik's TCP router uses a connection-level read deadline to bound protocol sniffing (peeking a TLS client hello), but then clears the deadline via conn.SetDeadline(time.Time{}) before delegating the connection to TLS forwarding.

A remote unauthenticated client can send an incomplete TLS record header and stop sending data. After the initial peek times out, the router clears the deadline and the subsequent TLS handshake reads can stall indefinitely, holding connections open and consuming resources.

Expected vs Actual

Expected: if an entrypoint-level read deadline is used to bound initial protocol sniffing, TLS handshake reads should remain bounded by a deadline (either the same deadline is preserved, or a dedicated handshake timeout is enforced).

Actual: after protocol sniffing the router clears the connection deadline and delegates to TLS handling; an attacker can keep the TLS handshake stalled beyond the configured read timeout.

Severity

HIGH
CWE: CWE-400 (Uncontrolled Resource Consumption)

Affected Code

  • pkg/server/router/tcp/router.go: (*Router).ServeTCP clears the deadline before TLS forwarding
  • conn.SetDeadline(time.Time{}) removes the entrypoint-level deadline that previously bounded reads

Root Cause

In (*Router).ServeTCP, after sniffing a TLS client hello, the router removes the connection read deadline:

// Remove read/write deadline and delegate this to underlying TCP server
// (for now only handled by HTTP Server)
if err := conn.SetDeadline(time.Time{}); err != nil {
    ...
}

TLS handshake reads that happen after this point are not guaranteed to have any deadline, so a client that stops sending bytes can keep the connection open indefinitely.

Attacker Control

Attacker-controlled input is the raw TCP byte stream on an entrypoint that routes to a TLS forwarder. The attacker controls:

  1. Sending a partial TLS record header (enough to trigger the TLS sniffing path)
  2. Stopping further sends so the subsequent handshake read blocks

Impact

Each stalled connection occupies file descriptors and goroutines (and may consume additional memory depending on buffering). By opening many such connections in parallel, an attacker can cause resource exhaustion and degrade availability.

Reproduction

Attachments include poc.zip with a self-contained integration harness. It pins the repository commit, applies fix.patch as the control variant, and runs a regression-style test that demonstrates the stall in canonical mode and the timeout in control mode.

Run canonical (vulnerable):

unzip poc.zip -d poc
cd poc
make test

Canonical output excerpt: PROOF_MARKER

Run control (deadline preserved / no stall):

unzip poc.zip -d poc
cd poc
make control

Control output excerpt: NC_MARKER

Recommended Fix

Do not clear the entrypoint-level deadline prior to completing TLS handshake, or enforce a dedicated handshake timeout for the TLS forwarder path.

Fix accepted when: an incomplete TLS record cannot stall past the configured entrypoint-level read deadline (or an explicit handshake timeout), and a regression test covers the canonical/control behavior.

### References - https://github.com/traefik/traefik/security/advisories/GHSA-xw98-5q62-jx94 - https://github.com/traefik/traefik/releases/tag/v2.11.38 - https://github.com/traefik/traefik/releases/tag/v3.6.9 - https://nvd.nist.gov/vuln/detail/CVE-2026-26999
@emilevauge emilevauge published to traefik/traefik Mar 4, 2026
Published to the GitHub Advisory Database Mar 4, 2026
Reviewed Mar 4, 2026
Published by the National Vulnerability Database Mar 5, 2026
Last updated Mar 5, 2026

Severity

High

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(5th percentile)

Weaknesses

Uncontrolled Resource Consumption

The product does not properly control the allocation and maintenance of a limited resource. Learn more on MITRE.

CVE ID

CVE-2026-26999

GHSA ID

GHSA-xw98-5q62-jx94

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.