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

> An attacker can hijack WireGuard peer endpoints and disrupt sessions by replaying captured packets due to premature state mutation before anti-replay checks.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:L/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 28 Aug 2026
- **Updated:** 1 Sep 2026
- **Also known as:** GHSA-x7q7-fjx9-4vj2

## What is CVE-2026-13734?

CVE-2026-13734 is a medium-severity vulnerability in zephyrproject zephyr, published on 28 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-294 (Authentication Bypass by Capture-replay)

## Which versions are affected by CVE-2026-13734?


## How do I fix CVE-2026-13734?

No fix has been published for CVE-2026-13734 yet. Limit exposure of the affected software until one is available.

## Is CVE-2026-13734 being exploited?

There is no known exploitation of CVE-2026-13734 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-13734 and fix it if it is affected.

What it is: CVE-2026-13734 is a medium-severity vulnerability in zephyrproject zephyr, published on 28 Aug 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-13734 in the wild and no public exploit code.

Affected product: zephyrproject zephyr. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-13734/ (Markdown: https://insights.sbomify.com/CVE-2026-13734/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-13734
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-13734
- OSV: https://osv.dev/vulnerability/CVE-2026-13734

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-13734/
Summaries are generated and may contain mistakes; the official description above is the record.
