Skip to main content

pion/stun CVE-2026-54909

| EUVDEUVD-2026-51666 MEDIUM
Improper Input Validation (CWE-20)
2026-07-31 GitHub_M GHSA-34rh-wp3j-6cxc
5.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send crafted STUN Binding-response via network
  2. Delivery
    Embed zero-length XOR-MAPPED-ADDRESS attribute
  3. Exploit
    Library calls GetFromAs on malformed value
  4. Execution
    Bounds check occurs too late, index panics
  5. Persist
    Go runtime panic crashes process
  6. Impact
    Denial of service achieved

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
Exploitation Conditions

The vulnerable code path is triggered during parsing of STUN Binding responses, specifically when the XOR-MAPPED-ADDRESS attribute (type 0x0020) has a value shorter than the minimum expected length. The attacker must be able to deliver a malformed STUN Binding-response packet to any network listener that calls XORMappedAddress.GetFrom or XORMappedAddress.GetFromAs on untrusted input - typical in ICE connectivity checks in WebRTC, STUN relay servers, or any service performing STUN attribute parsing. The CVSS vector PR:N and AV:N confirm no authentication is required and no special configuration is needed beyond the application simply using the library for STUN parsing. Exploitation is limited to services actively parsing incoming STUN Binding-response messages; services that only send STUN requests and never parse responses from untrusted sources would not be reachable via this path.

Impact

The CVSS 3.1 vector AV:N/AC:L/PR:N/UI:N places this at maximum exploitability - any network-reachable host running software that uses pion/stun to parse STUN Binding responses is exposed without any authentication barrier. The NVD-assigned score of 5.3 (Medium) reflects A:L (partial availability), but this appears understated: an unrecovered Go panic terminates the entire process, which in practice is a complete availability loss for the affected service. The independent assessment here raises this to A:H. EPSS data is absent from the input, so probability-of-exploitation scoring cannot be confirmed. KEV status is not set and no standalone POC tool is known, though the patch's test case in xoraddr_test.go provides a precise byte-for-byte reproduction of the triggering packet, significantly lowering the barrier for exploit development. The v2 and v1 module lines (github.com/pion/stun/v2 and github.com/pion/stun) have no fix available, representing a permanently vulnerable surface for projects that cannot migrate to the v3 module. Risk is elevated for any internet-facing WebRTC or ICE service using these unpatched module paths.

Exploit ScenarioDerived

An attacker targeting a WebRTC signaling service or TURN/STUN relay built on pion/stun sends a single UDP or TCP packet crafted as a STUN Binding success response (type 0x0101) containing a zero-length XOR-MAPPED-ADDRESS attribute (0x0020, length 0x0000). When the application calls XORMappedAddress.GetFrom on this message, GetFromAs attempts to read value[1] on a zero-length slice, triggering an unrecovered Go runtime panic that crashes the process. The exact triggering packet structure is publicly disclosed in the test case added by PR #278, making reproduction trivial.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.4% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Jul 31, 2026

Panic-triggered remote denial of service in pion/stun (Go STUN library) versions through 3.1.4 (v3), 2.0.0 (v2), and 1.23.1 (v1) allows an unauthenticated network attacker to crash any application embedding this library by sending a single malformed STUN or ICE Binding-response packet containing a zero-length XOR-MAPPED-ADDRESS attribute. The root cause is a misplaced bounds check in XORMappedAddress.GetFromAs that attempts to index into the value slice before validating minimum length, causing an unrecovered Go runtime panic that terminates the process. No public exploit identified at time of analysis, though the patch PR and test case publicly detail the exact malformed packet structure.

RemediationAI

For projects using github.com/pion/stun/v3, upgrade to v3.1.5 or later as directed by the GHSA advisory (https://github.com/pion/stun/security/advisories/GHSA-34rh-wp3j-6cxc); the GHSA explicitly states v3.1.5 contains the fix via PR #278. Note that the CVE description references v3.1.3 as the fix but the GHSA package metadata marks v3.1.4 as still vulnerable - treat v3.1.5 as the authoritative minimum safe version until the discrepancy is resolved with the maintainer. For projects using github.com/pion/stun/v2 or the original github.com/pion/stun module, no fix has been released; the only remediation is migration to the v3 module line. No workaround is available per the GHSA advisory. As a compensating control for teams unable to upgrade immediately, placing a network-layer filter or rate limiter in front of STUN endpoints to drop packets with malformed attribute lengths can reduce exposure, though this requires protocol-aware inspection. The patch commit is fa9f074a33a8059c76c960b1fbee39f308002423.

Affected VersionsENISA

stun < 3.1.3

Affected Packages

go github.com/pion/stun no fix
go github.com/pion/stun/v2 no fix
go github.com/pion/stun/v3 fix: 3.1.5
euvd stun fix: 3.1.3

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 4 packages in go, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

pion/stun (CPE: cpe:2.3:a:pion:stun:*:*:*:*:*:*:*:*) is a widely used Go implementation of RFC 5389 STUN, commonly embedded in WebRTC and ICE stacks including the broader pion ecosystem. The XOR-MAPPED-ADDRESS attribute (type 0x0020) carries the reflexive transport address in STUN Binding responses; parsing is handled by XORMappedAddress.GetFromAs in xoraddr.go. CWE-20 (Improper Input Validation) is the root cause: the original code attempted to read value[1] (the address family byte) before the len(value) <= 4 guard, so a zero-length attribute payload causes an index-out-of-bounds Go panic. The patch (PR #278, commit fa9f074) moves that bounds check to the top of the function, before any slice indexing. Because Go panics propagate up the call stack and terminate the goroutine (and the whole process if uncaught), this is a hard crash rather than a graceful error return.

Know when Stun gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (GitHub_M) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vuln.today AI 7.5 HIGH

Network-reachable with no auth; single malformed packet causes unrecovered Go panic, terminating the process - complete availability loss, not partial.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
SUSE MEDIUM

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

1
Patch available
Jul 31, 2026 - 23:02 EUVD

DescriptionCVE.org

pion/stun is a Go implementation of STUN. Prior to 3.1.3, XORMappedAddress.GetFromAs can panic while parsing a malformed short XOR-MAPPED-ADDRESS attribute in STUN or ICE Binding-response parsing paths, allowing remote denial of service. This issue is fixed in version 3.1.3.

Threat Intelligence Overview

EPSS Score
0.4%
Top 70% exploitable
Prevalence
Medium
widely used Go WebRTC/ICE library but not a universal infrastructure component
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Social Media
2
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.4%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

Vendor StatusVendor

SUSE

Severity: Moderate
Product Status
SUSE Linux Enterprise Server 16.1 Affected
SUSE Linux Enterprise Server for SAP applications 16.1 Affected

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy