Dec 3, 2026·11 min read·2 visits
Pion DTLS fails to bind cached DTLS 1.2 session entries to the endpoint role (client vs. server) or validate authentication attributes upon session resumption. In deployments sharing a SessionStore between client and server configurations, an untrusted remote server contacted by the victim client can connect back to the victim's DTLS listener and resume the outbound session, bypassing client certificate and PSK authentication.
CVE-2026-135390 is an authentication bypass vulnerability in the Pion DTLS Go library caused by improper validation of cached DTLS 1.2 sessions. When an application shares a single SessionStore across both outbound client connections and inbound server listeners, a remote server previously contacted by the application's client can reuse the negotiated session identifier and master secret to authenticate against the application's server listener via abbreviated session resumption, bypassing mutual TLS and Pre-Shared Key checks.
Pion DTLS (github.com/pion/dtls) is a widely deployed Go implementation of the Datagram Transport Layer Security (DTLS) 1.2 protocol (RFC 6347). It provides encrypted, authenticated datagram transport for network applications, IoT gateways, and real-time media protocols. To reduce latency and cryptographic overhead during repeated connections, Pion DTLS supports RFC 6347 abbreviated handshakes through a configurable SessionStore interface that caches established session identifiers and master secrets.
In versions >= 2.1.0, <= 2.2.12, >= 3.0.0, < 3.1.14, and v4.0.0-rc.1 through v4.0.0-rc.5, the session resumption mechanism suffers from an improper authentication vulnerability (CWE-287). The Session structure persisted in the SessionStore stores only the raw byte slice of the session ID and the 48-byte master secret. It omits metadata identifying whether the local endpoint acted as a DTLS client or a DTLS server when the session was originally established.
When a Go application configures both an outbound DTLS client and an inbound DTLS server listener to reference the same SessionStore instance, the cache becomes vulnerable to cross-role session confusion. Any external server that completes a handshake with the victim's outbound DTLS client learns both the SessionID and the masterSecret. That remote party can subsequently initiate an inbound connection to the victim's DTLS listener, present the learned SessionID in its ClientHello, and trigger an abbreviated resumption handshake.
Because the unpatched server listener validates only the presence of the SessionID in the shared store before transitioning to the abbreviated resumption flight (flight4b), it bypasses all server-side client authentication workflows. Neither client X.509 certificate verification nor Pre-Shared Key (PSK) validation callbacks are executed during this resumed handshake, allowing the external server to establish an authenticated session with the victim's listener.
The root cause of CVE-2026-135390 lies in an underspecified session state representation combined with insufficient state validation during DTLS flight processing. According to RFC 5246 and RFC 6347, a resumable TLS/DTLS session state must preserve not only the session identifier and master secret, but also the negotiated cipher suite, compression method, client and server certificates, and extended master secret (EMS) flags. Furthermore, session caches must remain strictly segregated by endpoint role so that client-side session entries cannot satisfy server-side resumption lookups.
In vulnerable versions of Pion DTLS, the Session struct defined in session.go was reduced to two fields: ID []byte and Secret []byte. When an outbound client connection received a ServerHello containing a session ID and completed key derivation, it stored the resulting Session object directly into cfg.sessionStore keyed by the remote server's chosen SessionID. Because the remote server generated the SessionID and participated in the key exchange, the remote server possessed complete knowledge of both values stored in the client's cache.
On the inbound path, when the Pion DTLS server listener processed an incoming ClientHello during flight0 (flight0handler.go), it invoked handleHelloResume. This function checked whether the incoming ClientHello carried a non-empty sessionID and queried cfg.sessionStore.Get(sessionID). If the lookup returned a struct where s.ID != nil, the listener immediately copied s.Secret into state.masterSecret, initialized the cipher suite, and advanced the state machine directly to flight4b (ServerHello, ChangeCipherSpec, and Finished).
This resumption path failed to verify four critical security invariants:
isClient == false) or an outbound client (isClient == true).RequireAndVerifyClientCert) or whether the stored session had ever satisfied client certificate validation or localPSKCallback verification.flight0 prior to stateless DTLS HelloVerifyRequest cookie validation (flight2), exposing the session store to unverified network traffic and premature state transition.Comparing the vulnerable implementation against the fixes introduced in Pull Request #1234 (specifically commits 2b234cd7174fc758372de0e479fc66515f54f631 and b8359836b8941ff2a37ad50fb23f801edebeece8) highlights the structural deficiencies in how sessions were stored and resumed.
In the unpatched code, session.go defined a minimal data structure, and flight0handler.go accepted any non-nil entry retrieved from the store:
// VULNERABLE: session.go
type Session struct {
ID []byte
Secret []byte
}
// VULNERABLE: flight0handler.go
func handleHelloResume(sessionID []byte, state *State, cfg *handshakeConfig, next flightVal) (flightVal, *alert.Alert, error) {
if len(sessionID) > 0 && cfg.sessionStore != nil {
if s, err := cfg.sessionStore.Get(sessionID); err != nil {
return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
} else if s.ID != nil {
// Vulnerability: No check on s.IsClient, clientAuth requirements, EMS, or PSK digests
cfg.log.Tracef("[handshake] resume session: %x", sessionID)
state.SessionID = sessionID
state.masterSecret = s.Secret
if err := state.initCipherSuite(); err != nil {
return 0, &alert.Alert{Level: alert.Fatal, Description: alert.InternalError}, err
}
cfg.writeKeyLog(keyLogLabelTLS12, state.localRandom.Bytes(), state.masterSecret)
state.cloneTo(&state.published)
return flight4b, nil, nil
}
}
return next, nil, nil
}The patch expands the Session structure in session.go to bind the protocol version, endpoint role (IsClient), cipher suite ID, Extended Master Secret flag, peer certificate chain, PSK identity hint, and a SHA-256 digest of the Pre-Shared Key. It also introduces the Session.usable(cfg *handshakeConfig, isClient bool) bool method to enforce strict validation before any cached entry can be resumed:
// PATCHED: session.go
type Session struct {
ID []byte
Secret []byte
Version uint8
IsClient bool
CipherSuiteID CipherSuiteID
ExtendedMasterSecret bool
PeerCertificates [][]byte
IdentityHint []byte
PSKHash [sha256.Size]byte
}
func (s Session) usable(cfg *handshakeConfig, isClient bool) bool {
// 1. Validate format version, strict role separation (IsClient), non-empty ID, and 48-byte master secret
if s.Version != 1 || s.IsClient != isClient || len(s.ID) == 0 || len(s.Secret) != 48 {
return false
}
// 2. Enforce Extended Master Secret (RFC 7627) policy consistency
if cfg.extendedMasterSecret == RequireExtendedMasterSecret && !s.ExtendedMasterSecret {
return false
}
if cfg.extendedMasterSecret == DisableExtendedMasterSecret && s.ExtendedMasterSecret {
return false
}
// 3. Confirm the stored CipherSuiteID is permitted by the current endpoint configuration
var suite CipherSuite
for _, candidate := range cfg.localCipherSuites {
if candidate.ID() == s.CipherSuiteID {
suite = candidate
break
}
}
if suite == nil {
return false
}
// 4. For PSK cipher suites, invoke localPSKCallback and verify the SHA-256 key digest matches
if suite.AuthenticationType() == CipherSuiteAuthenticationTypePreSharedKey {
if cfg.localPSKCallback == nil {
return false
}
key, err := cfg.localPSKCallback(s.IdentityHint)
return err == nil && sha256.Sum256(key) == s.PSKHash
}
// 5. For client-side resumption, re-verify the server's cached certificate chain
if isClient {
if len(s.PeerCertificates) == 0 {
return false
}
chains, err := verifySessionCertificate(s.PeerCertificates, cfg)
if err != nil {
return false
}
return cfg.verifyPeerCertificate == nil || cfg.verifyPeerCertificate(s.PeerCertificates, chains) == nil
}
// 6. For server-side resumption, disallow resumption if client certificate verification is mandatory
return cfg.clientAuth == NoClientCert || cfg.clientAuth == RequestClientCert
}In addition to Session.usable(), Pull Request #1234 hardens the surrounding handshake flights across several defense-in-depth commits:
flight0handler.go into flight2handler.go (after the client echoes a valid HelloVerifyRequest cookie), preventing unverified UDP spoofers from querying the session store.finishClientFlight (flight4b / flight6) after all authentication checks succeed, ensuring half-open handshakes cannot poison the store.State.Serialize() and Resume() now check an explicit handshakeComplete boolean and preserve remoteReplayCutoff sequence numbers to prevent state manipulation and packet replay across serialized connections.> [!NOTE]
> Fix Completeness Assessment: The remediation in PR #1234 is comprehensive. By enforcing s.IsClient != isClient alongside bytes.Equal(s.ID, sessionID) and re-evaluating PSK callbacks and client certificate policies on every resumption attempt, cross-role cache poisoning and authentication bypass variants along this code path are fully neutralized.
Exploiting CVE-2026-135390 requires no prior credentials on the target application's DTLS listener, but depends on specific architectural preconditions reflected in its AC:H (High Attack Complexity) CVSS metric:
dtls.SessionStore instance to both configurations.RequireAnyClientCert, VerifyClientCertIfGiven, or RequireAndVerifyClientCert) or Pre-Shared Key (PSK) authentication to restrict access.During the first stage of exploitation, the victim's outbound DTLS client sends a ClientHello to the attacker's DTLS server. The attacker's server responds with a ServerHello containing a non-empty SessionID (for example, a 32-byte identifier S_A) and completes a standard full handshake. If the victim's outbound client configuration allows anonymous, public-CA, or attacker-known credentials for outbound connections, the handshake completes and both endpoints derive the 48-byte masterSecret (K). The victim client automatically calls cfg.sessionStore.Set(S_A, Session{ID: S_A, Secret: K}).
During the second stage, the attacker initiates a new UDP connection to the victim's protected inbound DTLS listener. In the initial ClientHello packet, the attacker populates the session_id field with S_A and offers the same cipher suite used in the outbound connection. When the victim's listener receives this ClientHello, handleHelloResume queries the shared SessionStore for S_A, retrieves the cached secret K, and immediately responds with flight4b (ServerHello echoing S_A, ChangeCipherSpec, and an encrypted Finished message).
Because the attacker already possesses K from the first stage, the attacker computes the matching client Finished verify data, sends ChangeCipherSpec and Finished, and completes the DTLS handshake. The victim application's listener accepts the connection as a fully authenticated peer without ever requesting a client certificate or verifying the attacker's PSK identity.
Successful exploitation of CVE-2026-135390 grants an unauthenticated or untrusted external peer full access to a protected DTLS listener, completely bypassing mutual X.509 certificate authentication or PSK validation. Once the abbreviated handshake finishes, the attacker can read confidential application datagrams sent by the listener and inject arbitrary commands or data payloads into the authenticated server context.
The vulnerability carries a CVSS v3.1 base score of 7.4 (High) (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N). The High Confidentiality (C:H) and High Integrity (I:H) ratings reflect total compromise of the DTLS transport channel's authentication boundary and encryption keys for the forged session. The Attack Complexity is rated High (AC:H) because exploitation only affects deployments that explicitly configure a shared SessionStore across client and server roles and make outbound connections to untrusted peers. Availability Impact is rated None (A:N) because the vulnerability grants unauthorized access rather than causing service termination.
According to the vendor advisory, WebRTC deployments using Pion are not affected by CVE-2026-135390. Standard WebRTC architectures establish ephemeral, per-peer DTLS transports adjudicated via ICE and SDP signaling and do not utilize shared SessionStore session resumption caches across client and server listeners. Conversely, custom peer-to-peer overlays, CoAP-over-DTLS gateways, and federated telemetry nodes that share a single SessionStore for both ingress and egress DTLS peers are directly exposed.
Threat intelligence metrics indicate a low probability of indiscriminate mass exploitation: the EPSS score is 0.00576 (0.58%) at the 48.90th percentile, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog. No public exploit kits or automated scanning templates have been observed in the wild.
To remediate CVE-2026-135390, developers and operators should upgrade pion/dtls to a patched release that binds session entries to their originating endpoint role and re-verifies authentication requirements upon resumption.
v3.1.14 or later.v4.0.0-rc.6 or later.v2.x branch (>= 2.1.0, <= 2.2.12) should migrate to github.com/pion/dtls/v3@v3.1.14 or apply the architectural workaround below, as the official patch was released for v3 and v4.Update the Go module dependency using the Go toolchain:
go get github.com/pion/dtls/v3@v3.1.14
go mod tidyIf an immediate library upgrade cannot be deployed, applications can eliminate the vulnerability by segregating the SessionStore instances used by outbound client configurations and inbound listener configurations:
// WORKAROUND: Segregate SessionStore instances by endpoint role
clientSessionStore := MeinSessionStoreImplementation()
serverSessionStore := MeinSessionStoreImplementation()
clientConfig := &dtls.Config{
SessionStore: clientSessionStore,
// ... outbound client settings
}
serverConfig := &dtls.Config{
SessionStore: serverSessionStore,
ClientAuth: dtls.RequireAndVerifyClientCert,
// ... inbound server settings
}Alternatively, session resumption can be disabled entirely on security-critical DTLS listeners by setting SessionStore: nil in the server listener's dtls.Config structure.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
pion/dtls/v2 Pion | >= 2.1.0, <= 2.2.12 | v3.1.14 |
pion/dtls/v3 Pion | >= 3.0.0, < 3.1.14 | v3.1.14 |
pion/dtls/v4 Pion | >= 4.0.0-rc.1, < 4.0.0-rc.6 | v4.0.0-rc.6 |
| Attribute | Detail |
|---|---|
| CVE / GHSA ID | CVE-2026-135390 / GHSA-cqhp-ggp7-58qj |
| Weakness Class | CWE-287: Improper Authentication |
| CVSS v3.1 Score | 7.4 High (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N) |
| EPSS Score | 0.58% (48.90th Percentile) |
| Attack Vector | Network (DTLS 1.2 Abbreviated Session Resumption) |
| Primary Impact | Bypass of Client Certificate and PSK Authentication on DTLS Listeners |
| Exploit & KEV Status | No Public PoC / Not Listed in CISA KEV |
| Patched Versions | pion/dtls v3.1.14, v4.0.0-rc.6 |
When an actor claims to have a given identity, the software does not prove or insufficiently proves that the claim is correct.
CVE-2026-77132 is an authorization bypass and information disclosure vulnerability in the TYPO3 CMS backend localization wizard (ext:backend). Multiple backend AJAX endpoints failed to validate page-level and record-level access permissions before processing requests. As a result, authenticated backend users with restricted privileges can query these routes directly to enumerate sensitive metadata, record titles, unique identifiers, and layout structures across unauthorized sections of the page tree.
CVE-2026-141554 (GHSA-xhqj-2fcc-8vf7) is an incorrect authorization vulnerability (CWE-863) in AG2 (formerly AutoGen), an open-source AgentOS framework for multi-agent AI systems. In versions from 0.13.3 prior to 1.3.4, the SandboxShellTool component configured with readonly=True and an ignore pattern list fails to prevent recursive search and comparison utilities (grep, egrep, fgrep, and diff) from accessing and disclosing restricted files. Because the command-line security filter only inspects explicit path tokens passed as arguments rather than files discovered autonomously during directory traversal, an AI agent processing untrusted input or prompt injections can be induced to read and expose protected files such as .env configurations, cryptographic keys, and credentials.
Pion DTLS versions from 2.0.0 prior to 3.1.13 and 4.0.0-rc.6 fail to enforce an upper bound on the modulus bit length of peer RSA public keys during handshake signature and certificate chain verification. Because RSA verification performs modular exponentiation whose computational complexity grows superlinearly with modulus size, a remote unauthenticated peer can transmit a synthetic certificate containing an arbitrary multi-thousand-bit RSA modulus and an invalid signature to trigger CPU exhaustion.
Vapor JWTKit versions 4.0.0 prior to 5.8.0 fail to validate the audience (aud) claim in built-in vendor identity token payload types for Apple, Google, and Microsoft. This improper authentication flaw allows an attacker to obtain a legitimately signed ID token for a third-party client application and replay it against a relying party application using JWTKit, resulting in cross-client authentication bypass and account takeover.
GHSA-QMJC-65WP-7V34 documents a software supply-chain compromise targeting the Python Package Index (PyPI) package magique. Threat actors utilized stolen maintainer credentials to publish unauthorized phantom releases (versions 0.6.8 and 0.6.9) directly to PyPI on June 8, 2026. These distributions contain a malicious .pth path configuration file that automatically triggers an embedded JavaScript payload via the Bun runtime upon Python interpreter startup, resulting in credential theft, process memory scraping, and worm-like self-propagation.
CVE-2026-140231 is a memory exhaustion vulnerability in the node-tar package for Node.js prior to version 8.0.0. Because archive decompression lacks backpressure enforcement and zero-size archive entries queue in memory without upper bounds, an attacker who supplies a crafted compressed archive can force the host application to exhaust available resident memory and terminate via an Out-of-Memory (OOM) condition, bypassing existing decompression ratio checks.