Aug 1, 2026·6 min read·37 visits
Unauthenticated malformed STUN packets can trigger a runtime panic in Pion STUN before 3.1.3, causing a denial of service.
A remote denial of service vulnerability exists in the pion/stun package before version 3.1.3. A malformed STUN packet containing a short or empty XOR-MAPPED-ADDRESS attribute triggers a runtime slice-bounds panic during parsing, terminating the entire Go process.
CVE-2026-54909 is a remote denial of service vulnerability in the Pion STUN package. The vulnerability resides in the parsing of the XOR-MAPPED-ADDRESS attribute inside the library. Pion STUN is a Go-based implementation of the Session Traversal Utilities for NAT (STUN) protocol, which is critical for real-time WebRTC communications. The flaw allows an unauthenticated remote attacker to crash the application by sending a malformed packet over UDP or TCP.
The affected component is commonly deployed in public-facing roles such as STUN/TURN servers, signaling servers, and WebRTC media gateways. Because these components must interact with arbitrary internet clients, they present a high-exposure attack surface. A failure in the core parsing library directly impacts the availability of the dependent real-time communication infrastructure.
The vulnerability belongs to the improper input validation category (CWE-20). It manifests as an unhandled runtime slice-bounds panic when parsing a truncated or empty attribute value. Because the Go runtime terminates the entire process when a panic occurs in an unhandled goroutine, a single malformed packet can disable the service.
The root cause of CVE-2026-54909 is a sequence-of-operations flaw where slice indexing occurs before length validation. Specifically, the method XORMappedAddress.GetFromAs in the file xoraddr.go retrieves the raw byte slice of the target attribute. Before checking whether this slice contains sufficient data, the code attempts to read the first two bytes to determine the address family.
When an incoming STUN attribute has an indicated length of zero or one byte, the returned byte slice is shorter than the required minimum. The code immediately executes value[0:2] to parse the address family integer. Because the slice lacks the minimum required length, the Go runtime triggers a slice bounds out of range panic.
This out-of-order execution logic places the safety check after the potentially panicking operation. The check len(value) <= 4 is present in the vulnerable codebase but resides further down the execution flow. Consequently, any packet containing an empty XOR-MAPPED-ADDRESS attribute bypasses the check by triggering a fatal panic first.
The vulnerable implementation relies on the binary library to read the first two bytes of the attribute payload. The following code excerpt illustrates the out-of-order structure in vulnerable versions prior to 3.1.3:
// Vulnerable implementation
func (a *XORMappedAddress) GetFromAs(msg *Message, attr AttrType) error {
value, err := msg.Get(attr)
if err != nil {
return err
}
// Violation: Slicing value[0:2] before verifying len(value)
family := bin.Uint16(value[0:2])
if family != familyIPv6 && family != familyIPv4 {
return newDecodeErr("xor-mapped address", "family",
fmt.Sprintf("unknown family %d", family),
)
}
// ...
// Late check occurs after the slicing operation above
if len(value) <= 4 {
return io.ErrUnexpectedEOF
}
}The patch moves the length validation to the beginning of the function, immediately after retrieving the attribute value. This structural change ensures that any slice with a length of four bytes or fewer is rejected prior to any index access. The patched implementation handles the error gracefully instead of crashing the runtime:
// Patched implementation in v3.1.3
func (a *XORMappedAddress) GetFromAs(msg *Message, attr AttrType) error {
value, err := msg.Get(attr)
if err != nil {
return err
}
// Correction: Validate length before accessing indexes
if len(value) <= 4 {
return io.ErrUnexpectedEOF
}
// Safe slicing operation
family := bin.Uint16(value[0:2])
if family != familyIPv6 && family != familyIPv4 {
return newDecodeErr("xor-mapped address", "family",
fmt.Sprintf("unknown family %d", family),
)
}
}By returning io.ErrUnexpectedEOF, the library delegates the error handling to the connection loop. The calling routine discards the malformed packet and continues processing subsequent network traffic. This approach eliminates the vulnerability and ensures the application remains online during malformed packet encounters.
An attacker can exploit this vulnerability by sending a single, specifically crafted UDP packet to the listening STUN port. The target service must be running an application built with a vulnerable version of Pion STUN. Since STUN is typically exposed on UDP port 3478, no authentication or prior session state is required to reach the vulnerable code path.
The exploit payload requires a valid STUN header followed by a malformed XOR-MAPPED-ADDRESS attribute. The STUN header specifies a message type, a transaction ID, and a message length of 4 bytes. The subsequent attribute block contains the XOR-MAPPED-ADDRESS attribute identifier but specifies an attribute length of zero bytes.
A representation of the message flow and the resulting runtime exception is shown in the diagram below:
When the parser processes this attribute, the empty byte slice triggers the out-of-bounds error. The process terminates instantly, resulting in a denial of service for all connected clients.
The impact of CVE-2026-54909 is limited to a denial of service (DoS) with a CVSS v3.1 base score of 5.3. The vulnerability does not allow for remote code execution or information disclosure. The attack complexity is low, and no privileges or user interaction are required to execute the attack.
Despite the moderate CVSS score, the operational impact can be significant for environments relying on WebRTC. Real-time media streams, active calls, and signaling sessions are terminated when the host process crashes. Persistent automated attacks can prevent services from maintaining normal operations, leading to prolonged downtime.
Because the vulnerability resides in a core library, downstream products importing pion/stun are also affected. This includes WebRTC gateways, TURN servers, and custom signaling solutions. Security teams must audit their Go dependency graphs to identify transitive usage of the vulnerable package.
The primary remediation strategy is upgrading the github.com/pion/stun dependency to version 3.1.3 or later. This can be accomplished by updating the go.mod file and rebuilding the application. Organizations running downstream packages such as pion/webrtc should update those libraries to versions that import the patched STUN module.
If an immediate upgrade is not feasible, temporary mitigation can be implemented at the network level. Firewalls or intrusion prevention systems can be configured to filter out malformed STUN packets. Specifically, rules can target packets containing an XOR-MAPPED-ADDRESS attribute with an invalid length field.
Developers should also adopt safe coding practices when parsing binary protocols in Go. All slice indexing must be preceded by explicit boundary checks. Implementing automated fuzz testing can help identify similar index-out-of-bounds panics before code is deployed to production.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L| Product | Affected Versions | Fixed Version |
|---|---|---|
stun Pion | < 3.1.3 | 3.1.3 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-20 |
| Attack Vector | Network |
| CVSS v3.1 Score | 5.3 |
| Impact | Denial of Service |
| Exploit Status | poc |
| CISA KEV Status | No |
The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
CVE-2026-63402 is a prototype-chain traversal and shared built-in object corruption vulnerability in the i18next internationalization framework for JavaScript prior to version 26.3.4. The flaw resides in the deepExtend utility function within src/utils.js, which uses the JavaScript 'in' operator to verify property existence on target objects. When an application passes untrusted resource bundles to i18next.addResourceBundle() with both the deep and overwrite parameters set to true, an attacker can traverse into inherited methods on Object.prototype and overwrite properties on shared built-in function objects, causing process-wide denial of service.
CVE-2026-58262 (tracked internally as KLR-04 and via GitHub Security Advisory GHSA-f9h7-4mmq-vgcq) is a cryptographic verification and consensus quorum bypass vulnerability in Klever-Go (`klever-io/klever-go`), the Go implementation of the Klever blockchain protocol. Prior to version 1.7.20, the block header signature verification logic (`HeaderSigVerifier.verifyConsensusSize`) counts all set bits across the entire `PubKeysBitmap` byte slice toward the required two-thirds validator quorum without masking or validating unused trailing padding bits in the final byte. Because the underlying Boneh-Lynn-Shacham (BLS) multi-signature verification function (`blsMultiSigner.Verify`) iterates strictly over the indices of configured validator public keys, it ignores any bits set at indices beyond the active consensus group size. When the consensus group size is not an exact multiple of 8, a compromised or malicious block producer can set these unused trailing padding bits to artificially inflate the apparent signer count by up to 7 signatures, enabling blocks with fewer genuine validator signatures than required by the protocol to pass consensus validation.
CVE-2026-77423 is a Regular Expression Denial of Service (ReDoS) vulnerability in the built-in less viewer of the JLine Java library (versions 3.0.0 prior to 3.30.15, and 4.0.0 prior to 4.3.1). The org.jline.builtins.Less class passes user-supplied search and display-filter patterns directly to Java's standard backtracking regular expression engine without complexity validation or execution timeouts. An attacker with access to an interactive JLine session can submit patterns containing nested quantifiers, causing catastrophic backtracking that consumes 100% of a CPU core and blocks the session thread indefinitely. In network-facing deployments such as SSH or Telnet administration consoles, repeated exploitation across concurrent sessions can exhaust bounded worker thread pools and result in a complete denial of service.
CVE-2026-63492 is a rejected CVE identifier originally assigned by GitHub for an OS command injection vulnerability in WWBN AVideo (formerly YouPHPTube) up to version 29.0. It was rejected as a duplicate of the canonical identifier CVE-2026-63304 (tracked under GHSA-j44m-77cc-p3cc). The flaw resides in the listFFmpegProcesses() function within plugin/API/standAlone/functions.php, which interpolates unsanitized user parameters directly into a single-quoted shell pipeline executed via PHP's exec() function. Attackers capable of crafting a valid AES-256-CBC encrypted API payload can break out of the single-quoted context and execute arbitrary operating system commands as the web-server user.
CVE-2026-63476 is an uncontrolled resource consumption vulnerability in isomorphic-git prior to version 1.38.6. When parsing Git packfile delta objects during clone or fetch operations, the applyDelta utility reads an untrusted targetSize integer from the delta stream header and passes it directly to Buffer.alloc(). A malicious remote Git server or man-in-the-middle attacker can supply a delta header specifying a targetSize of approximately 2 GB with minimal actual payload data. Because Buffer.alloc() reserves off-heap memory in Node.js, this bypasses standard V8 heap limits and results in immediate out-of-memory termination or sustained memory retention.
CVE-2026-63410 (GHSA-vp2j-gqfm-r3cf) is a compiler-induced timing side-channel vulnerability in the secp256k1-native Ruby C extension. When compiled with GCC 14.x or 15.x at optimization level -O2, the compiler reconstructs boolean predicates from branchless bitwise multiplexer routines and emits secret-dependent conditional jump instructions (je/jne). During elliptic curve scalar multiplication in the Montgomery ladder, these conditional branches create observable execution timing variations correlated with individual bits of secret private keys or signing nonces.