CVE-2026-13734: Zephyr WireGuard mutates peer state before anti-replay check, enabling capture-replay endpoint hijack

Published Aug 28, 2026
·
Updated

Zephyr's WireGuard VPN data-plane receive handler wgprocessdatamessage() in subsys/net/lib/wireguard/wgcrypto.c validated the anti-replay counter too late. After AEAD decryption of a MESSAGETRANSPORTDATA packet succeeded, the code committed several peer-state changes — updatepeeraddr() (endpoint roaming update), the keypair->lastrx/peer->lastrx liveness timers, and keypairupdate() (promote next→current and destroy the previous keypair) — and only afterward called wgcheckreplay(). 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 wgcheckreplay() to immediately after a successful decrypt, before any peer-state mutation, matching the WireGuard specification and the Linux reference implementation.

Affected Software

1 affected component
Zephyr WireGuard

Event History

Aug 28, 2026
CVE Published
via MITRE·08:38 PM
Data Sourced
via MITRE·08:38 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Does exploitation require WireGuard credentials or an established session with the target?

No. The receive handler is reachable directly through inbound UDP datagrams without credentials. However, the attacker must first capture a valid WireGuard transport-data ciphertext, such as from an on-path position or a shared network medium.

2

What can an attacker do with a captured packet?

They can replay the authentic packet from an arbitrary spoofed source address. Although the replay is ultimately rejected, peer-state changes made first are not rolled back, including updating the peer endpoint and receive/liveness state.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203