# CVE-2026-79977 - WireGuard peer endpoint learned from unauthenticated transport-data messages allows off-path tunnel hijack in Zephyr

DevFeed: [CVE-2026-79977 - WireGuard peer endpoint learned from unauthenticated transport-data messages allows off-path tunnel hijack in Zephyr](<https://devfeed.tech/articles/cve-2026-79977-wireguard-peer-endpoint-learned-from-unauthenticated-transport-data-messages-allows-off-path-tunnel-hijack-in-zephyr-98407.md>)

Original publisher: [Read original article](<https://cvefeed.io/vuln/detail/CVE-2026-79977>)

Author: cvefeed.io

Published: 2026-10-23T20:17:27Z

Content type: article

Language: en

Sources: [Latest High/Critical Vulnerabilitiy Feed](<https://devfeed.tech/sources/latest-high-critical-vulnerabilitiy-feed.md>)

Topics: [Virtual Private Network](<https://devfeed.tech/topics/vpn.md>), [Cryptography](<https://devfeed.tech/topics/cryptography.md>), [Encryption](<https://devfeed.tech/topics/encryption.md>)

Tags: [2026](<https://devfeed.tech/tags/2026.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [boot](<https://devfeed.tech/tags/boot.md>), [cryptographic](<https://devfeed.tech/tags/cryptographic.md>), [cryptographic-identity](<https://devfeed.tech/tags/cryptographic-identity.md>), [cve](<https://devfeed.tech/tags/cve.md>), [cve-2026-79977](<https://devfeed.tech/tags/cve-2026-79977.md>), [devices](<https://devfeed.tech/tags/devices.md>), [encrypted](<https://devfeed.tech/tags/encrypted.md>), [handshake](<https://devfeed.tech/tags/handshake.md>), [handshakes](<https://devfeed.tech/tags/handshakes.md>), [hijack](<https://devfeed.tech/tags/hijack.md>), [index](<https://devfeed.tech/tags/index.md>), [interface](<https://devfeed.tech/tags/interface.md>), [key](<https://devfeed.tech/tags/key.md>), [message](<https://devfeed.tech/tags/message.md>), [peer](<https://devfeed.tech/tags/peer.md>), [transport](<https://devfeed.tech/tags/transport.md>), [wireguard](<https://devfeed.tech/tags/wireguard.md>), [zephyr](<https://devfeed.tech/tags/zephyr.md>), [zephyrproject](<https://devfeed.tech/tags/zephyrproject.md>)

## AI overview

In Zephyr's WireGuard service, an unauthenticated transport-data message with an unknown receiver index could overwrite a peer's endpoint with an attacker-chosen address when no valid handshake or current keypair exists. A reachable UDP listener makes this possible off-path with a single spoofed datagram; later handshakes and tunnel traffic are then redirected, potentially persistently disrupting the tunnel. Relaying redirected handshakes can expose ciphertext and traffic metadata, but WireGuard encryption still prevents content decryption or forgery. The described fix removes endpoint learning from this recovery path: it sends the handshake to an endpoint learned through authentication, falls back to the configured endpoint, or drops the message if neither is known. WireGuard support is experimental and disabled by default.

## Source excerpt

CVE ID :CVE-2026-79977 Published : Oct. 23, 2026, 8:17 p.m. | 1 hour, 29 minutes ago Description :The WireGuard VPN service in subsys/net/lib/wireguard/wg.c updated the peer endpoint from a message it could not authenticate. In handle_transport_data(), when the 32-bit receiver index of an incoming transport-data message matched no session, the code both scheduled a new handshake and copied the datagram's source address into peer->endpoint with memcpy(&peer->endpoint, peer_addr, sizeof(peer->endpoint)). Because the receiver index is unknown, there is no key with which such a message could be verified, so the address written into peer->endpoint is entirely attacker-supplied. Every other endpoint update in the implementation happens only after authentication -- after the Noise handshake in handle_handshake_init(), or after AEAD decryption plus the anti-replay check in wg_process_data_message(). The WireGuard listener is registered with net_udp_register() using no remote address or port filter and defaults to UDP port 51820 (CONFIG_WIREGUARD_PORT), and wg_ctrl_recv() resolves the peer by interface rather than by any cryptographic identity. Any host able to send a UDP datagram to that port can therefore reach the defect off-path, with no need to observe legitimate traffic: a 16-byte datagram carrying the transport-data type, zeroed reserved bytes and an arbitrary receiver index is sufficient. The vulnerable branch runs whenever the peer has neither a valid handshake nor a current keypair -- the state at boot and after a session expires. A single spoofed datagram redirects peer->endpoint to an address of the attacker's choosing, and all subsequent handshake initiations, keepalives and encrypted data packets are sent there. The legitimate peer never receives the initiations and so never re-authenticates, and nothing resets the endpoint afterwards, leaving the tunnel persistently unusable on devices whose peer does not initiate handshakes itself. The attacker can also relay t