Pion DTLS: Oversized peer RSA keys allow excessive CPU consumption during DTLS handshakesGHSA-jp25-wc3w-p9xp
Fix: pion/dtls#1229GHSA-jp25-wc3w-p9xp is a Uncontrolled Resource Consumption vulnerability in github.com/pion/dtls/v3. A fix is available for github.com/pion/dtls/v3 — see the affected versions and patch details below.
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-jp25-wc3w-p9xp.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
github.com/pion/dtls/v3🐹github.com/pion/dtls/v2🐹github.com/pion/dtls/v4Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Summary
Pion DTLS did not limit the size of RSA public keys in peer certificates before performing signature verification. A remote peer could provide a certificate containing an unusually large RSA modulus and trigger expensive cryptographic operations, causing excessive CPU consumption.
Discovered by Anthropic's OSS Scanner, tracking ID 3X1BUF5Y.
Details
The vulnerable implementation parsed peer certificates and passed their RSA public keys directly to handshake signature verification without checking the modulus size.
An attacker does not need to generate a corresponding RSA private key or provide a valid handshake signature. A certificate containing a large, attacker-chosen public modulus and an invalid signature is sufficient to trigger expensive verification before rejection. The affected paths include verification of ServerKeyExchange and CertificateVerify. Peer certificate chains also lacked an explicit RSA key-size limit.
Impact
Repeated or concurrent malicious handshakes can consume substantial CPU resources, reducing service availability and delaying legitimate connections. WebRTC applications can be affected when an attacker can reach the DTLS handshake and cause an RSA verification path to execute. Using a local ECDSA certificate does not itself prevent the peer from presenting an RSA certificate.
fixed by https://github.com/pion/dtls/commit/fa6e8d38a3a61044117628bde1ac8c1318f34379 by rejecting peer RSA public keys larger than 8,192 bits like crypto/tls.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/pion/dtls/v3 | ≥ 3.0.0&&< 3.1.13 | 3.1.13go get github.com/pion/dtls/v3@v3.1.13 |
| 🐹Go | github.com/pion/dtls/v2 | ≥ 2.0.0 | No fix |
| 🐹Go | github.com/pion/dtls/v4 | all versions | 4.0.0-rc.6go get github.com/pion/dtls/v4@v4.0.0-rc.6 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/pion/dtls/v3, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/pion/dtls/v3 to 3.1.13 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-jp25-wc3w-p9xp is resolved across your whole dependency graph.
Workarounds
Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat rates this flaw Moderate because exploiting it requires the attacker to control or impersonate the flow collector that a Network Observability component is configured to send to over DTLS, and the impact is limited to CPU consumption on the exporting component, with no effect on confidentiality or integrity.…
Only Network Observability deployments that export flow data over DTLS are exposed. Switching the flow export to TCP transport removes the DTLS handshake and the vulnerable code path. Alternatively, restrict network access to the flow collector so only trusted endpoints can act as the DTLS peer.Source: Red Hat security advisory for GHSA-jp25-wc3w-p9xp (CC BY 4.0)
Frequently Asked Questions
Is GHSA-jp25-wc3w-p9xp in your dependencies?
Find it across Go, including transitive dependencies.