CUJO Smart Firewall safe browsing Host header-parsing firewall bypass vulnerability
The CUJO Smart Firewall's safe browsing function parses individual TCP packets and extracts the Host header using a regular expression that fails when the HTTP request is split across multiple packets. An attacker can bypass the firewall's malicious website filtering by sending a request with an overlong path, causing the Host header to appear in a later packet that does not match the pattern.
Originally disclosed on Cisco Talos
An exploitable vulnerability exists the safe browsing function of the CUJO Smart Firewall, version 7003. The bug lies in the way the safe browsing function parses HTTP requests.
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The firewall inspects individual TCP packets rather than reassembling the full HTTP stream, so its regular expression fails to extract the Host header when the request is fragmented.
Impact
An attacker could bypass the firewall's safe browsing filtering to visit malicious websites, and this could be combined with another vulnerability to remotely compromise the device.
What the attacker needed
Ability to send HTTP requests to a malicious host; control over the request path length
How it was found
- Send an HTTP GET request to a malicious host with an overlong path so that the request is split across multiple TCP packets.
- The first packet contains only the request line and part of the path, without the Host header.
- The second packet contains the rest of the path and the Host header.
- The firewall's regular expression does not match either packet, so the connection is allowed.
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 report has not been written yet. The Original tab links to the source.
The firewall tries to block bad websites by reading the web address (Host header) from each network packet. But if a request is split into two packets, the firewall only sees part of the request and misses the Host header, so it lets the traffic through. An attacker can deliberately split the request to sneak past the filter.
What is Smuggling / CRLF?
A front end and a back end split one connection's bytes into requests differently, letting an attacker hide a request inside another user's.