> ## Content Index
> Fetch the complete content index at: https://stackurity.ai/blog/llms.txt
> Use this file to discover other available public pages before exploring further.

# Pion DTLS CVE-2026-135388: forged handshakes, upgrade to 3.1.13
- URL: https://stackurity.ai/blog/pion-dtls-cve-2026-135388-handshake-forgery-upgrade-3-1-13/
- Published: 2026-12-01T01:35:02.000Z
- Updated: 2026-12-01T01:35:02.000Z
- Description: Pion DTLS before 3.1.13 accepts forged handshake signatures, so an attacker can impersonate a peer. Who is affected, how to check and how to fix it.
- Author: Stackurity Research Team
- Tags: Open Source Libraries, #deep-dive

## TL;DR

- **What:** Pion DTLS, a Go library for Datagram Transport Layer Security, accepted forged handshake signatures because it did not check that the signature scheme matched the certificate's key type.
- **Impact:** an attacker who can redirect a handshake and who holds the peer's public certificate can impersonate that peer without its private key, which breaks the confidentiality and integrity of the protected traffic.
- **Severity:** a CVSS v3.1 score of 9.1 from GitHub (CVE-2026-135388, GHSA-7c2r-jhm9-43vf).
- **Exploited:** we have no record that it is listed as exploited, but the advisory is public and the attack needs no credentials.
- **Fix:** upgrade github.com/pion/dtls/v3 to 3.1.13 or later and rebuild every program that embeds it.

## What the vulnerability is

DTLS is the version of TLS that runs over UDP. It protects real-time traffic such as WebRTC calls and data channels, and it is used by many IoT and media systems. Pion is a widely used Go implementation of it, and many Go programs that do WebRTC pull it in without anyone choosing it directly.

During a DTLS handshake each side proves that it owns the private key behind its certificate by signing part of the handshake. The check in Pion DTLS picked the signature algorithm from the certificate's public key, but worked out the hash from the signature scheme that the peer supplied, without checking that the two were consistent. The two affected functions are `verifyKeySignature`, used for ServerKeyExchange, and `verifyCertificateVerify`, used for CertificateVerify.

The GitHub advisory describes a signature built only from the public key of an ECDSA certificate that both functions accepted, and one forged signature passed for two unrelated handshake messages, so the check did not depend on the handshake at all. The weakness is tracked as CWE-347, improper verification of a cryptographic signature. The advisory was published on November 30, 2026, and NVD lists the same flaw as [CVE-2026-135388](https://nvd.nist.gov/vuln/detail/CVE-2026-135388).

## Why it matters now

A signature check is the part of a handshake that stops someone else from claiming to be your peer. If it can be forged, encryption still happens, but with the wrong party. The advisory says that an attacker who can redirect the handshake, and who can get the peer's public certificate (which is public by design), can impersonate the peer. That is a realistic position for anyone on the network path, such as a hostile access point or a compromised router.

The trap for WebRTC users is the usual defence. Applications often compare the certificate fingerprint announced in the SDP offer with the certificate presented. The advisory states plainly that this is no defence, because the attacker presents the genuine certificate and only forges the proof that they hold its key.

The other reason this matters is where the library hides. Pion DTLS is rarely listed in a project's own code. It arrives as a dependency of a WebRTC stack, a media server, a camera gateway or a remote-support tool, and then ends up compiled into a binary in a container image. If you track libraries by what is actually deployed, [Stackurity's reachability findings](https://stackurity.ai/docs/reachability) show whether a package is actually reached, and the [comparison with Snyk for deployed apps](https://stackurity.ai/compare/snyk-alternative) explains how that differs from scanning only source repositories. For another case where a developer tool became a risk, see [our post on the Ruflo bridge flaw](https://stackurity.ai/blog/ruflo-cve-2026-59726-unauthenticated-mcp-bridge-rce-upgrade-3-16-3/).

## Am I affected?

You are affected if any Go program you build or run uses Pion DTLS in a vulnerable version. The GitHub advisory lists two modules: github.com/pion/dtls/v3 from 3.0.0 up to but not including 3.1.13, and github.com/pion/dtls/v2 from 2.0.0 up to 2.2.12\. NVD's description puts the start of the affected range at 2.0.0 and names 3.1.13 as the release with the fix.

To check one project by hand, from its source folder:

- Run `go list -m all` and look for `github.com/pion/dtls` in the output, which shows the version your build resolves to.
- Run `go mod why github.com/pion/dtls/v3` to see which of your dependencies pulls it in.
- For a program that is already built, run `go version -m` on the binary to list the modules compiled into it.

Version numbers are only part of the picture. A container image built from an older commit keeps its old code until you rebuild it, so check the image as well as the repository. A program that uses DTLS only for outgoing connections is still in scope, because the flaw is in how a peer's signature is verified.

## How to fix CVE-2026-135388

1. **Find every use.** List the repositories, binaries and images that include `github.com/pion/dtls`, using the commands above, and note the version and the owner of each.
2. **Upgrade to 3.1.13 or later.** In a project that depends on it directly, run `go get github.com/pion/dtls/v3@v3.1.13`. If it comes through another library, upgrade that library to a release that requires the fixed version, or add a direct requirement on 3.1.13 so that the build resolves to it.
3. **Handle the v2 module separately.** The advisory lists a vulnerable range for the v2 module up to 2.2.12 but names no patched v2 release, so do not assume that a newer v2 tag exists. Check the maintainers' advisory linked below and plan a move to the v3 module.
4. **Rebuild and redeploy.** A Go program carries its dependencies inside the binary, so the fix only reaches production when you rebuild it and roll out the new image. Run your WebRTC or DTLS tests before you ship.
5. **Confirm the fix.** Run `go list -m all` again, or `go version -m` on the new binary, and check that it reports 3.1.13 or later.

If you cannot upgrade today, the advisory describes no workaround. Reduce exposure by keeping DTLS endpoints off untrusted networks where you can. The authority for the full details is the maintainers' advisory: [GHSA-7c2r-jhm9-43vf](https://github.com/advisories/GHSA-7c2r-jhm9-43vf).

## How to check with Stackurity

Stackurity keeps one live inventory of what runs on your servers, in deployed applications, repositories and container images. It reads lockfiles in repositories and the libraries deployed applications load, and in a container image it reads the modules that Go records in each Go binary, without running it. Everything is matched against OSV advisories every hour. A Pion DTLS release before 3.1.13 therefore appears as a vulnerable Go component in every repository or image that carries it, with the upgrade that clears it. After you upgrade, Stackurity checks again and records whether the issue is really gone.

Be clear about the limit: libraries copied into an application outside a package manager or lockfile are not covered, so a vendored copy of the source needs a manual check. [Start a free trial](https://app.stackurity.dev/signup?utm%5Fsource=blog&utm%5Fmedium=referral&utm%5Fcampaign=open-source-libraries&utm%5Fcontent=pion-dtls-cve-2026-135388-handshake-forgery-upgrade-3-1-13) to see which of your repositories and images carry the vulnerable release.

## FAQ

### Which Pion DTLS versions are affected by CVE-2026-135388?

For the v3 module, versions from 3.0.0 up to but not including 3.1.13\. For the v2 module, the advisory lists versions from 2.0.0 up to 2.2.12\. NVD's description starts the range at 2.0.0.

### What is the fixed version?

Version 3.1.13 of github.com/pion/dtls/v3 is the fixed release. The advisory lists no patched release for the v2 module, so check the maintainers' advisory before you decide how to handle a v2 dependency.

### Is CVE-2026-135388 exploited in the wild?

We have no record that it is listed as exploited, so we do not claim it is. The advisory is public and the attack needs no credentials, so treat any exposed DTLS service as urgent.

### Does checking the WebRTC certificate fingerprint protect me?

No. The advisory says that comparing the SDP certificate fingerprint is no defence, because the attacker presents the genuine certificate of the peer and only the proof of possession is forged.

### How do I find which of my projects use Pion DTLS?

Search your Go module files and lockfiles for github.com/pion/dtls, remembering that it is often a transitive dependency of a WebRTC library. Stackurity does this across repositories and container images and lists each place with the upgrade that clears it.

## Sources

[NIST National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-135388), [GitHub Advisory Database](https://github.com/advisories/GHSA-7c2r-jhm9-43vf), [Stackurity product facts](https://stackurity.ai/llms.txt).