{"id":"CVE-2026-13734","published":"2026-08-28T20:38:49Z","modified":"2026-09-01T12:26:16Z","title":"Zephyr WireGuard mutates peer state before anti-replay check, enabling capture-replay endpoint hijack","vendor":"zephyrproject","product":"zephyr","tier":"tail","description":{"text":"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.\n\nThe 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.\n\nBecause 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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00332,"percentile":0.27126,"provenance":"source"},"cwes":[{"id":"CWE-294","name":"Authentication Bypass by Capture-replay"}],"references":[{"url":"https://github.com/zephyrproject-rtos/zephyr/commit/260c32ef9a89824bd25e17170e77aa4b98c84069","tags":["patch"]},{"url":"https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-x7q7-fjx9-4vj2","tags":[]}],"priority":{"score":10.0,"factors":[{"name":"EPSS percentile","points":5.43},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"zephyrproject","affectedVersions":[{"vendor":"zephyrproject","product":"zephyr","versions":[">= 4.4.0, < 4.4.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-09-01T12:26:06.530502Z","from":"CISA ADP","provenance":"source"},"euvd":{"id":"EUVD-2026-67946","exploited":false,"provenance":"source"}}