Pion DTLS Client Auth Bypass, Fixed in 3.1.14 (CVE-2026-135389)
Pion DTLS stores sessions before client authentication, so an attacker can resume an unfinished handshake and bypass client certificates; fixed in 3.1.14.
TL;DR
- Pion DTLS saves a resumable session before it verifies the client's Finished message or client certificate, so an unauthenticated peer can resume an unfinished handshake and skip those checks. The GitHub CVE record rates it CVSS v3.1 9.1 Critical.
- Servers that use a SessionStore with certificate cipher suites and require a client certificate are affected. Pion DTLS v2.1.0 to 2.2.12, v3 before 3.1.14 and v4 before 4.0.0-rc.6 are vulnerable.
- No in-the-wild exploitation is reported, and the CVE is not in CISA KEV as of 2026-12-03. A public proof-of-concept repository appeared on 2026-12-03.
- Upgrade to 3.1.14 or 4.0.0-rc.6, or migrate off the unpatched v2 line. "How do I fix it?" covers the SessionStore workaround.
Am I affected?
All of these must hold:
- The DTLS listener runs an affected release of
github.com/pion/dtls. - The listener sets a
SessionStore, which enables session resumption. - The listener negotiates a certificate-based cipher suite and requires a client certificate with
RequireAnyClientCertorRequireAndVerifyClientCert. - An attacker can send DTLS traffic to the listener.
The flaw does not affect applications that use Pion DTLS only through the Pion WebRTC stack, the advisory says. A DTLS listener that does not set a SessionStore does not issue a resumable session ID, so it is not exposed to the main bypass.
| Branch | Affected versions | Fixed version |
|---|---|---|
| Pion DTLS v2 | 2.1.0 to 2.2.12 | no fixed v2 release |
| Pion DTLS v3 | before 3.1.14 | 3.1.14 |
| Pion DTLS v4 | before 4.0.0-rc.6 | 4.0.0-rc.6 |
Pion published v3.1.13, v3.1.14 and v4.0.0-rc.6 on 2026-10-16. The v3.1.13 release fixes a separate handshake-cache denial of service, CVE-2026-135392. The v3.1.14 and v4.0.0-rc.6 releases fix this authentication bypass and a related session-reuse bypass, CVE-2026-135390.
Check every module your build resolves:
go list -m -f '{{.Path}} {{.Version}}' all | grep 'github.com/pion/dtls'
grep -R "github.com/pion/dtls" go.mod go.sum
Then check whether the listener configures a SessionStore and requires client certificates:
grep -rn "SessionStore" --include='*.go' .
grep -rn "RequireAnyClientCert\|RequireAndVerifyClientCert" --include='*.go' .
A module line at v3.1.13 or lower, or a SessionStore in the DTLS config, is the combination to review. A v2 line cannot be patched in place; it needs a migration.
How do I fix it?
Upgrade the module to a fixed release and rebuild. The fix is in the v3.1.14 and v4.0.0-rc.6 tags.
- Find the module line with
go list -m all | grep 'github.com/pion/dtls'. - For the v3 line, run
go get github.com/pion/dtls/v3@v3.1.14and thengo mod tidy. - For the v4 line, run
go get github.com/pion/dtls/v4@v4.0.0-rc.6and thengo mod tidy. - For the v2 line, move the listener to v3.1.14 or v4.0.0-rc.6. The import path changes from
github.com/pion/dtls/v2togithub.com/pion/dtls/v3orgithub.com/pion/dtls/v4, so plan the API migration and test the handshake. - Rebuild and run a handshake test with a client certificate and with session resumption enabled. Confirm that an unfinished handshake no longer stores a session.
If you cannot upgrade yet, remove the SessionStore from the Config you pass to the listener. Without a store, Pion DTLS does not generate a session ID and does not publish a resumable session, so the bypass has nothing to resume. The cost is that every client loses DTLS session resumption, including legitimate clients, and handshakes become more expensive.
That workaround does not fix the separate v3.1.13 cache denial of service, so upgrade as soon as you can. It also does not protect a listener that uses an external session store behind a custom SessionStore implementation; such a listener must upgrade.
Pion's advisory and the upstream fix commits are the authoritative record of the fix: GHSA-hhpj-h56m-9f2p, commit ce84b979 and commit 2b234cd7.
What is the root cause?
Pion DTLS saves the session after it processes ClientKeyExchange but before it validates the client's Finished message and runs the configured client-authentication checks. The session is therefore resumable while the handshake is still unauthenticated.
flight4Parse calls flight4ProcessClientFlight at the start of the flight when the client flight has not been processed:
if !state.clientFlightProcessed {
ready, alertPtr, err := flight4ProcessClientFlight(state, cache, cfg)
if !ready || err != nil {
return 0, alertPtr, err
}
}
Those lines are 34 to 39 of flight4handler.go at tag v3.1.13. flight4ProcessClientFlight reads ClientKeyExchange, derives the master secret and writes the session into the configured store:
if len(state.SessionID) > 0 {
s := Session{
ID: state.SessionID,
Secret: state.masterSecret,
}
cfg.log.Tracef("[handshake] save new session: %x", s.ID)
if err := cfg.sessionStore.Set(state.SessionID, s); err != nil {
return false, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
}
}
Those lines are 300 to 309 of the same file. The server generates the session ID in flight4Generate whenever a SessionStore is configured. The ID and the master secret are enough to resume.
Only after flight4ProcessClientFlight returns does flight4Parse pull the Finished message and verify its VerifyData. It then enforces RequireAnyClientCert or RequireAndVerifyClientCert and calls verifyConnection. The store write has already happened. The test in the patch makes the ordering explicit: an unfinished handshake must publish no resumable session. Pion credits Anthropic's OSS Scanner (ANT-2026-8ECSI13S) for the report.
The same ordering bug is why a rejecting VerifyConnection callback does not help. The attacker never reaches that callback before the session is stored.
How is it exploited?
An attacker who knows the master secret from an unfinished handshake can resume the stored session over a second connection. The server then accepts application data without the client certificate checks.
- Open a DTLS handshake to the listener with a certificate cipher suite.
- Read the server's CertificateRequest and send ClientKeyExchange, which is enough for both sides to derive the master secret.
- Omit the Certificate, CertificateVerify and Finished messages.
- The server processes ClientKeyExchange, stores the session ID and master secret, and waits for a Finished message that never arrives.
- Open a second connection and send a ClientHello that offers the stored session ID.
- Complete the abbreviated handshake with the master secret. The server resumes the session and skips the client-certificate and
VerifyConnectionchecks.
The attacker does not need a session ID issued to it in advance. The server creates one during the unfinished handshake.
A public repository created on 2026-12-03 includes a lab and a PoC harness that reports whether an unfinished handshake writes a session. It is a differential harness around the upstream code, not a ready-made remote exploit. The repository says the vulnerable path reports one session-store write and the fixed path reports none.
How does the attack flow?
One unfinished handshake plants a resumable session, and a second connection resumes it past the client-certificate check.
What can an attacker do?
An attacker who completes the resumption becomes an authenticated DTLS peer to the listener and can send application data that the listener treats as authenticated, and read the responses it sends back over that connection.
The impact is an authentication bypass, not memory corruption. The advisory does not demonstrate code execution, and the public PoC harness demonstrates the session write, not a full application compromise. What the attacker can do after the handshake depends on the protocol the listener protects. A listener that carries configuration, telemetry or control messages exposes those messages to the attacker.
A listener that uses the DTLS peer certificate as its only authorization signal inherits the attacker as an authorized peer. The resumed connection carries the same application data path as a legitimate client, so application-level audit logs may show ordinary traffic.
The conditions are a SessionStore, a certificate cipher suite, a required client certificate and network reach to the DTLS listener. The attacker needs no account, no certificate and no interaction from a legitimate client. If the listener also accepts PSK cipher suites, the bypass does not apply to those suites.
Applications that use Pion DTLS through Pion WebRTC are not affected, the advisory says. They should still upgrade, because the fixed releases also close the related session-reuse bypass and the cache denial of service.
Why does the fix work?
The fix moves the session write out of flight4ProcessClientFlight and into a new finishClientFlight function that runs after the Finished message and the client-authentication checks pass.
- return flight6, nil, nil
+ return finishClientFlight(state, cfg)
}
switch cfg.clientAuth {
@@
- return flight6, nil, nil
+ return finishClientFlight(state, cfg)
}
@@
- if len(state.SessionID) > 0 {
- s := Session{
- ID: state.SessionID,
- Secret: state.masterSecret,
- }
- cfg.log.Tracef("[handshake] save new session: %x", s.ID)
- if err := cfg.sessionStore.Set(state.SessionID, s); err != nil {
- return false, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
- }
- }
-
state.handshakeRecvSequence = seq
state.clientKeyExchange = nil
state.clientFlightProcessed = true
@@
+func finishClientFlight(state *State, cfg *handshakeConfig) (flightVal, *alert.Alert, error) {
+ if len(state.SessionID) > 0 && cfg.sessionStore != nil {
+ if err := cfg.sessionStore.Set(state.SessionID, Session{ID: state.SessionID, Secret: state.masterSecret}); err != nil {
+ return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
+ }
+ }
+
+ return flight6, nil, nil
+}
The diff is from commit ce84b979. flight4Parse now reaches finishClientFlight only at its two success exits, after it has verified Finished.VerifyData, enforced the client-certificate mode and run verifyConnection. An unfinished handshake returns early with an error or waits for more packets, so it never reaches the session store.
The patch also changes the regression test to require zero session-store calls for an unfinished handshake. That is the behavior the fix promises.
The fix is complete for CVE-2026-135389 on the v3 and v4 lines. The v2 line has no fixed release, so a v2 listener needs a migration. The same v3.1.14 and v4.0.0-rc.6 releases also carry the role-binding fix for CVE-2026-135390, and v3.1.13 carries the handshake-cache fix for CVE-2026-135392.
How do I check if I was compromised?
No network indicators are published for this flaw. The vulnerable code logs one trace line when it stores a session, so the first check is the DTLS trace log.
grep -i "save new session" /var/log/your-dtls-service.log
On a vulnerable server with trace logging enabled, that line can appear for a handshake that never completes. Correlate each line with the next handshake event from the same peer. The fix deletes this trace call, so on 3.1.14 or 4.0.0-rc.6 the grep returns nothing by design: run it on logs written before the upgrade.
Then review the application logs for data from peers that never presented a client certificate. The listener's own logs may not record the certificate subject, so an application-level audit is the reliable check.
A blocked or abandoned attempt may leave no trace, and an attacker who completed the bypass looks like a normal authenticated peer after the handshake. If you cannot show that every resumption came from a certificate-authenticated peer, treat the listener as potentially exposed and rotate any secrets it carried.
Timeline
The fix landed in October, the CVE records followed in November, and a public PoC repository appeared in December.
- 2026-10-16: Pion released v3.1.13 with the handshake-cache fix, then v3.1.14 and v4.0.0-rc.6 with the session-authentication and role-binding fixes in commits
ce84b979and2b234cd7. - 2026-11-23: The three CVEs were reserved.
- 2026-11-24: The CVE records for CVE-2026-135389, CVE-2026-135390 and CVE-2026-135392 were published.
- 2026-12-02: NVD published its records for the three CVEs.
- 2026-12-03: Public PoC repositories for CVE-2026-135389 and CVE-2026-135392 were created. No in-the-wild exploitation was reported, and the CISA KEV catalog version 2026.11.30 does not list the CVEs.
FAQ
Is CVE-2026-135389 exploited in the wild?
No public report of exploitation existed as of 2026-12-03. The CVE is not in CISA KEV, and the Pion advisory does not mention attacks.
Does it affect Pion WebRTC?
No. The advisory says WebRTC users are not affected. The flaw needs a DTLS listener that sets a SessionStore and requires client certificates.
Do I need a client certificate to exploit it?
No. The attacker omits the certificate and resumes the session instead. The server then skips the certificate and VerifyConnection checks.
Is there a workaround if I cannot upgrade?
Yes. Remove the SessionStore from the listener config. That disables session resumption for every client and removes the resumable session the bypass needs. It does not fix the separate cache denial of service.
What about the v2 line?
There is no fixed v2 release. Move the listener to v3.1.14 or v4.0.0-rc.6, or apply the patch commit to a maintained fork and test it.
Does 3.1.14 also fix the other Pion DTLS flaws?
Yes. v3.1.14 includes the v3.1.13 handshake-cache fix and the v3.1.14 role-binding fix for CVE-2026-135390. v4.0.0-rc.6 carries both.
References
- Pion DTLS advisory for CVE-2026-135389: https://github.com/pion/dtls/security/advisories/GHSA-hhpj-h56m-9f2p (checked December 3, 2026)
- Pion DTLS advisory for CVE-2026-135390: https://github.com/pion/dtls/security/advisories/GHSA-cqhp-ggp7-58qj (checked December 3, 2026)
- Pion DTLS advisory for CVE-2026-135392: https://github.com/pion/dtls/security/advisories/GHSA-jm57-r6vj-mwg9 (checked December 3, 2026)
- CVE-2026-135389 record: https://www.cve.org/CVERecord?id=CVE-2026-135389 (checked December 3, 2026)
- CVE-2026-135390 record: https://www.cve.org/CVERecord?id=CVE-2026-135390 (checked December 3, 2026)
- CVE-2026-135392 record: https://www.cve.org/CVERecord?id=CVE-2026-135392 (checked December 3, 2026)
- Pion DTLS fix commit
ce84b979: https://github.com/pion/dtls/commit/ce84b979bcb5449727b3ea5c57add4e1edb33284 (checked December 3, 2026) - Pion DTLS role-binding commit
2b234cd7: https://github.com/pion/dtls/commit/2b234cd7174fc758372de0e479fc66515f54f631 (checked December 3, 2026) - Pion DTLS v3.1.14 release: https://github.com/pion/dtls/releases/tag/v3.1.14 (checked December 3, 2026)
- Pion DTLS v4.0.0-rc.6 release: https://github.com/pion/dtls/releases/tag/v4.0.0-rc.6 (checked December 3, 2026)
- Pion DTLS v3.1.13 release: https://github.com/pion/dtls/releases/tag/v3.1.13 (checked December 3, 2026)
- pkg.go.dev imported-by page for v2: https://pkg.go.dev/github.com/pion/dtls/v2?tab=importedby (checked December 3, 2026)
- pkg.go.dev imported-by page for v3: https://pkg.go.dev/github.com/pion/dtls/v3?tab=importedby (checked December 3, 2026)
- pkg.go.dev imported-by page for v4: https://pkg.go.dev/github.com/pion/dtls/v4?tab=importedby (checked December 3, 2026)
- Public PoC repository for CVE-2026-135389: https://github.com/googlesky/CVE-2026-135389 (checked December 3, 2026)
- CISA KEV catalog: https://www.cisa.gov/known-exploited-vulnerabilities-catalog (checked December 3, 2026)
Keep reading
