Description
Zephyr's WireGuard VPN data-plane receive handler wg_process_data_message() in subsys/net/lib/wireguard/wg_crypto.c validated the anti-replay counter too late. After AEAD decryption of a MESSAGE_TRANSPORT_DATA packet succeeded, the code committed several peer-state changes — update_peer_addr() (endpoint roaming update), the keypair->last_rx/peer->last_rx liveness timers, and keypair_update() (promote next→current and destroy the previous keypair) — and only afterward called wg_check_replay(). On a replayed packet the replay check returned -EINVAL, but none of the preceding mutations were rolled back.

The AEAD tag authenticates content but not freshness, so a replayed-but-authentic transport packet decrypts correctly. An attacker who captures one valid ciphertext off the wire (an on-path or shared-medium observer) can re-inject it from an arbitrary spoofed source address. Reaching the handler requires no credentials: it is driven directly from inbound UDP datagrams via the dispatch in subsys/net/lib/wireguard/wg.c.

Because the state mutations committed before the replay check, the replay repoints the peer endpoint to the attacker-chosen source address (roaming hijack), redirecting the victim's subsequent outbound tunnel traffic until the legitimate peer's next packet re-corrects it; it also prematurely destroys the previous keypair and refreshes the RX liveness timer. The tunnel payload stays encrypted under the session keypair, so this is an integrity/availability impact (traffic redirection and session disruption), not payload disclosure. The fix moves wg_check_replay() to immediately after a successful decrypt, before any peer-state mutation, matching the WireGuard specification and the Linux reference implementation.
Published: 2026-08-28
Score: 6.5 Medium
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

Zephyr’s WireGuard implementation permits a replayed packet to alter peer state before anti‑replay validation, allowing an attacker to redirect the peer endpoint to a spoofed address and cause traffic hijacking. Because the packet decrypts successfully, the attack requires only interception of one valid ciphertext and re‑injection, producing a compromise of session integrity and availability. The flaw stems from improper ordering of operations, classified as CWE‑294: Decryption and Replay Validation Order Failure.

Affected Systems

The affected product is Zephyr Project’s Zephyr RTOS networking subsystem, specifically the WireGuard data plane. Any Zephyr build prior to commit 260c32ef9a89824bd25e17170e77aa4b98c84069 is vulnerable. No explicit version range is provided; the patch is included in later releases.

Risk and Exploitability

The CVSS score of 6.5 denotes medium severity. EPSS is not available, and the vulnerability is not listed in CISA’s KEV catalog. The attack can be performed by any adversary who can intercept traffic on the WireGuard tunnel and replay the cipher text from an arbitrary source address. No credentials or privileged access are required; the exploit relies solely on the WireGuard UDP dispatch. Consequently, the risk is significant for deployments with roaming enabled or where source address validation is lax.

Generated by OpenCVE AI on August 29, 2026 at 00:06 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the Zephyr update that moves the replay check before peer‑state mutations, as implemented in commit 260c32ef9a89824bd25e17170e77aa4b98c84069.
  • Disable WireGuard roaming or restrict it to trusted peers until the patch is applied to prevent endpoint hijacking.
  • Configure inbound UDP filtering on the WireGuard port to allow only the legitimate peer address and reject packets with unexpected source addresses.

Generated by OpenCVE AI on August 29, 2026 at 00:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 28 Aug 2026 23:45:00 +0000

Type Values Removed Values Added
First Time appeared Zephyrproject
Zephyrproject zephyr
Vendors & Products Zephyrproject
Zephyrproject zephyr

Fri, 28 Aug 2026 22:00:00 +0000

Type Values Removed Values Added
Description Zephyr's WireGuard VPN data-plane receive handler wg_process_data_message() in subsys/net/lib/wireguard/wg_crypto.c validated the anti-replay counter too late. After AEAD decryption of a MESSAGE_TRANSPORT_DATA packet succeeded, the code committed several peer-state changes — update_peer_addr() (endpoint roaming update), the keypair->last_rx/peer->last_rx liveness timers, and keypair_update() (promote next→current and destroy the previous keypair) — and only afterward called wg_check_replay(). On a replayed packet the replay check returned -EINVAL, but none of the preceding mutations were rolled back. The AEAD tag authenticates content but not freshness, so a replayed-but-authentic transport packet decrypts correctly. An attacker who captures one valid ciphertext off the wire (an on-path or shared-medium observer) can re-inject it from an arbitrary spoofed source address. Reaching the handler requires no credentials: it is driven directly from inbound UDP datagrams via the dispatch in subsys/net/lib/wireguard/wg.c. Because the state mutations committed before the replay check, the replay repoints the peer endpoint to the attacker-chosen source address (roaming hijack), redirecting the victim's subsequent outbound tunnel traffic until the legitimate peer's next packet re-corrects it; it also prematurely destroys the previous keypair and refreshes the RX liveness timer. The tunnel payload stays encrypted under the session keypair, so this is an integrity/availability impact (traffic redirection and session disruption), not payload disclosure. The fix moves wg_check_replay() to immediately after a successful decrypt, before any peer-state mutation, matching the WireGuard specification and the Linux reference implementation.
Title Zephyr WireGuard mutates peer state before anti-replay check, enabling capture-replay endpoint hijack
Weaknesses CWE-294
References
Metrics cvssV3_1

{'score': 6.5, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H'}


Subscriptions

Zephyrproject Zephyr
cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-08-28T20:38:49.617Z

Reserved: 2026-06-29T14:44:08.624Z

Link: CVE-2026-13734

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-28T22:16:46.057

Modified: 2026-08-28T22:16:46.057

Link: CVE-2026-13734

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-29T00:15:06Z

Weaknesses
  • CWE-294

    Authentication Bypass by Capture-replay