Skip to content

WireGuard keepalive transport-data messages accepted without Poly1305 authentication

Low
d3zd3z published GHSA-xxrw-r78f-f6mx Aug 28, 2026

Software

zephyr

Affected versions

>= 4.4.0, < 4.4.2

Patched versions

4.4.2

Description

Zephyr's WireGuard implementation in subsys/net/lib/wireguard/wg_crypto.c mishandled keepalive packets. In wg_process_data_message(), any type-4 transport-data message whose payload was exactly 16 bytes (an empty plaintext plus a bare Poly1305 tag, i.e. a keepalive) was accepted and returned immediately, before wg_decrypt_packet() was ever called. The Poly1305 authentication tag was therefore never verified; the only preceding gates were a cleartext receiver-index lookup (get_peer_keypair_for_index() on the attacker-supplied data_hdr->receiver) and a non-cryptographic keypair validity/expiry check.

The path is reachable entirely from the network: inbound UDP on the WireGuard port is dispatched by wg_input() to handle_transport_data() and then wg_process_data_message(). The 32-bit receiver index is transmitted in cleartext in WireGuard handshake and data messages, so an on-path observer learns it directly and an off-path attacker can brute-force it against the UDP port. Given an active receiving-valid session for that index, an attacker could send a 16-byte garbage payload and have it accepted without possessing the session key.

On acceptance the unauthenticated message caused the management layer to observe a spoofed NET_EVENT_VPN_CONNECTED signal (setting peer->first_valid and notifying any net_mgmt listener) and incremented the keepalive-RX statistic. The impact is limited to integrity of this status signal: no plaintext is decrypted or injected, no key is disclosed, and the early-return path did not update the peer endpoint or liveness timers, so there is no traffic-injection, session-takeover, or availability consequence.

The fix removes the pre-decrypt early return so a 16-byte payload flows through wg_decrypt_packet(), which verifies the Poly1305 tag over the empty plaintext, followed by the existing anti-replay check; only an authenticated, non-replayed message is then recognised as a keepalive. Forged keepalives now fail the tag check and are counted as decrypt failures.

Affected components

  • subsys/net/lib/wireguard

Affected versions

>= 4.4.0, < 4.4.2

Fix

Fixed in 4.4.2. Release lines that have not yet taken the backport remain affected — see the affected version range above.

Introduced by: a239800 (net: wireguard: Add initial implementation, 2026-03-23; first shipped in v4.4.0)

Evidence

  • subsys/net/lib/wireguard/wg_crypto.c:1417-1424 — post-fix: keepalive (data_len==16) is recognised only AFTER wg_decrypt_packet() and wg_check_replay() succeed
  • subsys/net/lib/wireguard/wg_crypto.c:1366-1382 — Poly1305 decrypt and anti-replay gate that the pre-fix keepalive path bypassed
  • subsys/net/lib/wireguard/wg_crypto.c:1384-1387 — NET_EVENT_VPN_CONNECTED notify / first_valid set; pre-fix this also ran in the unauthenticated early return
  • v4.4.0:subsys/net/lib/wireguard/wg_crypto.c:1327-1339 (git show) — vulnerable early return that fired before decryption, as shipped in v4.4.0
  • subsys/net/lib/wireguard/wg.c:897,706-722 — dispatch: MESSAGE_TRANSPORT_DATA -> handle_transport_data() -> wg_process_data_message(), keyed on cleartext receiver index, confirming network reachability
  • subsys/net/lib/shell/events.c:505-508 — NET_EVENT_VPN_CONNECTED is a consumed management event (the spoofed signal)
  • git tag --contains a239800 includes v4.4.0 — vulnerable code shipped in a release (reportable)

Patches

Branch Pull request Status
main #11104387c520a55f0f merged
v4.4-branch #112250 merged

For more information

If you have any questions or comments about this advisory:

embargo: 2026-08-28

Severity

Low

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
Low
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:N

CVE ID

CVE-2026-13735

Weaknesses

Authentication Bypass by Spoofing

This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. Learn more on MITRE.