WatchGuard Fireware OS IKEv2 iked Out-of-Bounds Write RCE (CVE-2025-9242)
Published: 2026-11-27 • Researcher: McCaulay Hudson (@_mccaulay), watchTowr Labs
Exploitation signals
Confirmed exploited in the wild. Added to CISA KEV 2025-11-12. Federal remediation deadline 2025-12-03.
EPSS 29.1% · 99th percentile
- Severity
- Critical
- CVE
- CVE-2025-9242
- Category
- network
- Affected product
- WatchGuard Fireware OS (iked process; mobile user VPN with IKEv2 and branch office VPN with a dynamic gateway peer)
- Affected versions
- Fireware OS 11.10.2 through 12.11.4 and through 12.5.13 on T15/T35 models (11.x is end-of-life); vendor advisory also lists 2025.1 before 2025.1.1 and 12.3.1 FIPS before 12.3.1_Update3
- Disclosed
- 2026-11-27
- Patch status
- Unverified
References
- https://nvd.nist.gov/vuln/detail/CVE-2025-9242
- https://github.com/watchtowrlabs/watchTowr-vs-WatchGuard-CVE-2025-9242
- https://www.watchguard.com/wgrd-psirt/advisory/wgsa-2025-00015
- https://psirt.watchguard.com/CVE-2025-9242
- https://labs.watchtowr.com/yikes-watchguard-fireware-os-ikev2-out-of-bounds-write-cve-2025-9242/
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2025-9242
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-27 |
| Last Updated | 2026-03-03 |
| Author / Researcher | McCaulay Hudson (@_mccaulay), watchTowr Labs |
| CVE / Advisory | CVE-2025-9242 |
| Category | network |
| Severity | Critical |
| CVSS Score | 9.8 (CVSSv3.1, NVD) |
| Status | Weaponized |
| Tags | RCE, OOB-write, IKEv2, iked, WatchGuard, Fireware, unauthenticated, ROP, shellcode, CWE-787 |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | WatchGuard Fireware OS (iked process; mobile user VPN with IKEv2 and branch office VPN with a dynamic gateway peer) |
| Versions Affected | Fireware OS 11.10.2 through 12.11.4 and through 12.5.13 on T15/T35 models (11.x is end-of-life); vendor advisory also lists 2025.1 before 2025.1.1 and 12.3.1 FIPS before 12.3.1_Update3 |
| Language / Platform | Python 3 attacker script; target is a WatchGuard Firebox appliance running Linux x86_64, IKEv2 on UDP/500 |
| Authentication Required | No |
| Network Access Required | Yes |
Summary
WatchGuard Fireware OS mishandles IKEv2 payload lengths in the iked daemon, producing an out-of-bounds write that a remote unauthenticated attacker can turn into code execution. The watchTowr Labs tool performs IKEv2 security-association negotiation, fingerprints the firmware build from the vendor ID, verifies the overflow by sending a 513-byte authentication blob that a patched build rejects, and then builds a stack-smashing payload with a ROP chain and position-dependent shellcode for Fireware 12.11.3. The chain calls mprotect to make the overwritten stack executable and starts a bind shell using the appliance’s Python interpreter. CISA added the issue to its KEV catalog after reports of exploitation.
Vulnerability Details
Root Cause
The iked process copies attacker-controlled IKEv2 authentication payload data into a fixed-size stack buffer without validating the supplied length. A 512-byte authentication blob is handled normally, but a 513-byte blob writes past the end of the buffer and corrupts adjacent stack state; a larger crafted payload overwrites saved registers and the return address. Because the appliance’s Python interpreter address and a set of ROP gadgets are stable for a given firmware build, the attacker can redirect execution through the corrupted return address into a ROP chain. NVD classifies the defect as CWE-787, out-of-bounds write.
Attack Vector
The attacker sends IKEv2 packets to UDP port 500 on a Firebox that has either mobile user VPN with IKEv2 enabled or a branch office VPN with a dynamic gateway peer configured. After a normal IKE_SA_INIT exchange and transform negotiation, the tool sends a crafted IKE_AUTH authentication payload. The tool first probes with 512-byte and 513-byte blobs to distinguish a patched from a vulnerable build, then sends the full exploit payload. No credentials or authenticated VPN session are required.
Impact
Unauthenticated remote code execution on the firewall, which sits at the network perimeter and often terminates site-to-site and remote-access VPNs. The PoC’s shellcode raises the stack buffer to read-write-execute and starts a bind shell running /usr/bin/python3, giving the attacker an interactive foothold on the appliance. Compromise exposes VPN configuration, pre-shared keys, certificates and the protected networks behind the firewall.
Environment / Lab Setup
OS: Linux attacker host (Python 3)
Target: WatchGuard Firebox running Fireware OS 12.11.3 (the only build
for which this PoC carries gadget and symbol offsets), IKEv2
service on UDP/500
Attacker: Python 3.8+ with the cryptography package on the same network
Tools: python3, cryptography, netcatSetup Steps
The upstream repository does not include instructions for building a Firebox lab image; testing requires a physical Firebox or a Fireware OS virtual appliance in a lab, with the target IKEv2 configuration enabled. There is no local lab harness in this entry. Install the dependency and confirm the CLI:
| |
Proof of Concept
Step-by-Step Reproduction
- Check reachability and fingerprint the firmware — the tool sends an IKE_SA_INIT with a default transform set. If the service answers, it extracts the WatchGuard vendor ID and parses the VN and BN fields for the firmware version and build number.
- Verify the overflow — unless soft verification is requested, it sends a 512-byte authentication payload (expected to be handled), then a 513-byte payload. A patched build drops or times out on the oversized blob; a vulnerable build still responds.
- Build the exploit — for Fireware 12.11.3 the tool composes a 520-byte buffer containing a sockaddr_in for the bind address, the path to /usr/bin/python3 and the shellcode, followed by filler for the saved registers and the ROP chain.
- Trigger the overflow — the payload is sent as the authentication payload after a fresh IKE_SA_INIT; the corrupted return address pivots into the ROP chain, which calls mprotect on the stack page and jumps to the shellcode.
- Connect to the bind shell — the shellcode binds to the supplied local host and port and runs /usr/bin/python3 interactively; connect with netcat.
Exploit Code
See
watchTowr-vs-WatchGuard-CVE-2025-9242.pyin this folder. The upstream README isupstream-README.md.
| |
The ROP chain in the script is arranged as: pivot rbp to rsp and call through r13; compute the page-aligned stack buffer address; load the bind GOT entry and subtract a fixed libc offset to reach mprotect; call mprotect with PROT_READ|PROT_WRITE|PROT_EXEC on the stack page; then jump into the shellcode.
Expected Output
[#] Sending IKEv2 SA Init with default transform
[#] WatchGuard Firmware Version: 12.11.3
[#] WatchGuard Build Number: 719894
[+] IKEv2 service is vulnerable to CVE-2025-9242 based on version number 12.11.3 < 12.11.4
[+] Default IKEv2 service found
[#] Verifying if IKEv2 service is vulnerable...
[+] IKEv2 service is vulnerable to CVE-2025-9242
[#] Building shellcode payload...
[#] Building ROP chain...
[#] Sending exploit payload to 192.168.56.1:31337After the payload is sent, the bind shell listens on the supplied address and port; connecting to it yields a Python interactive prompt running on the appliance.
Detection & Indicators of Compromise
SIEM / IDS Rule (example):
alert udp any any -> any 500 (msg:"WatchGuard Fireware CVE-2025-9242 oversized IKE_AUTH"; \
content:"|00 00 00 00|"; depth:4; \
byte_test:2,>,512,0,relative; sid:9009242;)Remediation
| Action | Detail |
|---|---|
| Patch | Upgrade Fireware OS to 12.11.4 or later (12.5.13 or later on T15/T35), to 2025.1.1 or later, or to 12.3.1_Update3 for the FIPS-certified 12.3.1 release; 11.x is end-of-life and must be replaced. |
| Workaround | Disable mobile user VPN with IKEv2 and branch office VPNs using a dynamic gateway peer until patched; note the vendor warning that a Firebox previously configured with either feature may remain vulnerable if a branch office VPN to a static gateway peer is still configured. Restrict UDP/500 to known peer addresses. |
| Config Hardening | Limit IKEv2 exposure at the network edge, monitor iked for crashes and unexpected child processes, rotate VPN pre-shared keys and certificates on any appliance that may have been exposed, and keep Fireware OS on a supported release train. |
References
Notes
Auto-prepared 2026-11-27 from https://github.com/watchtowrlabs/watchTowr-vs-WatchGuard-CVE-2025-9242 (last upstream commit 2026-03-03, McCaulay Hudson / watchTowr Labs). Review verdict: genuine exploit. Although the upstream README labels the tool a detection artifact generator, the script contains and sends a complete ROP-chain and shellcode payload when the exploit flag is supplied, so it was ingested rather than skipped as a detector. The upstream repository has no license file, so the file is archived with attribution for authorized security research only. Limitations: the exploit path carries gadget and symbol offsets only for Fireware 12.11.3, so other builds are fingerprint-only; the bind address is supplied as the local host argument and must be an address the appliance can bind; the payload is position-dependent and assumes the tested build layout; the tool was verified by the author against a lab Firebox, not re-run here. CISA added this CVE to its KEV catalog on 2025-11-12. Run only against systems you own or have written authorization to test.
| |