Skip to content
RCE Write-up Advanced

The Blind Exploits To Rule Watchguard Firewalls Vulnerabilities

The WatchGuard Firebox/XTM appliances contained multiple vulnerabilities, including a blind alphanumeric .bss overflow in the XML-RPC parser, a time-based XPath injection in the authentication CGI, and an integer overflow leading to heap overflow or use-after-free. An attacker could exploit these to achieve pre-authentication remote code execution or extract sensitive configuration data.

tutorialboy24.blogspot.com

Published on tutorialboy24.blogspot.com

Early this year, WatchGuard firewalls have been under attack multiple times, most notably by the Russian APT Sandworm and their malware, Cyclops Blink. Over the course of 4 months, the editor released three firmware updates, patching numerous critical vulnerabilities.

The author, on tutorialboy24.blogspot.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely multiple root causes: an unbounded strcat into a fixed .bss buffer, unsanitised user input in an XPath query, and an integer overflow in a realloc-based concatenation function.

Impact

An attacker could achieve pre-authentication remote code execution as root on WatchGuard Firebox/XTM appliances, and also extract sensitive configuration data via the XPath injection.

What the attacker needed

Network access to the appliance; no authentication required

The fix

The vulnerabilities were fixed in firmware updates released by WatchGuard.

How it was found

  1. Send an XML-RPC request with a huge XML tag to overflow current_xpath.
  2. Use the overflow to overwrite the tcache pointer for 0x20-sized chunks.
  3. Allocate and free chunks to manipulate the tcache and create overlapping chunks.
  4. Overwrite the GOT entry of free() with a system wrapper.
  5. Trigger free() with arbitrary data to execute commands.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

This report describes several security flaws in WatchGuard firewalls. One flaw lets an attacker send a specially crafted request that overflows a buffer and can lead to running commands on the device. Another flaw allows extracting information from configuration files by measuring response times. These issues could let an attacker take control of the firewall without logging in.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.