← Back to blog

CVE-2023-46747: A critical F5 Big-IP vulnerability

· Security research

In early October 2023, security researchers at Praetorian Security discovered a critical vulnerability in the F5 Big-IP product line. The flaw was assigned the identifier CVE-2023-46747 and rated CVSS 9.8 out of 10, almost the highest severity score possible. The affected Big-IP versions range from 13.x to 17.x.

F5 Networks released a patch on 26 October, but within a week working exploits were already available to everyone on the internet. This meant that every Big-IP without the patch became a potential target.

Halloween was, in the truest sense of the word, a chilling day for IT specialists, who had to urgently look for solutions for organisations running this equipment.

What the attack consists of

Exploiting CVE-2023-46747 consists of three stages that together form a complete attack chain, from the first request to full control of the system:

  1. HTTP Request Smuggling — a malicious request is smuggled behind a legitimate one by manipulating HTTP/1 headers. This is the initial technique that opens the way for further exploitation.
  2. Authentication bypass — the smuggled request reaches the internal Big-IP management interface (TMUI) with a forged X-Forwarded-For: 127.0.0.1 header. The server believes the request comes from the system itself and grants access without a password.
  3. Remote code execution (RCE) — having obtained administrator access, the attacker can run commands on the server, take over the entire system or use it as a foothold deeper into the network.

We will look at each stage in more detail below.

1. HTTP Request Smuggling

A Big-IP system consists of several layers: an Apache proxy server receives HTTP requests, checks them and passes them to an internal Tomcat server for execution. The attack exploits the different ways these two layers interpret HTTP requests.

HTTP Request Smuggling is a technique in which a malicious request is smuggled behind a legitimate one by manipulating HTTP/1 headers (Content-Length and Transfer-Encoding). The Apache proxy sees one request, while Tomcat sees two. The second, smuggled request bypasses all security checks.

HTTP Request Smuggling diagram
The principle of HTTP Request Smuggling: a malicious request is smuggled behind a legitimate one
HTTP request example
A malicious HTTP request with hidden content

Important: the HTTP/2 protocol is resistant to this type of attack, but if a reverse proxy using HTTP/1 is misconfigured, an attacker can force the server to use the older protocol and exploit this vulnerability.

2. Authentication bypass

When the smuggled request reaches Tomcat, it calls the internal Big-IP management functions (TMUI). The key is the X-Forwarded-For: 127.0.0.1 header, which tricks the server into believing the request comes from localhost. As a result, the system skips the authentication check.

The attack chain looks like this:

  1. The attacker sends a specially crafted HTTP request to the Big-IP TMUI (the management interface)
  2. The Apache proxy accepts the request as legitimate and passes it to Tomcat
  3. Tomcat interprets the smuggled second request, which calls the internal management functions
  4. Because of the forged X-Forwarded-For: 127.0.0.1, the server believes the request comes from localhost, so authentication is skipped
  5. A new administrator user is created, without any password

3. Remote code execution (RCE)

Remote Code Execution (RCE) is considered one of the most dangerous types of vulnerability, because it gives a malicious actor the ability to run commands on the vulnerable server remotely, without any credentials or authorisation.

In the case of this Big-IP vulnerability, the attack is particularly straightforward: by exploiting the flaw, an attacker can create a system user with administrator rights and easily take over control of the system through the standard web interface. However, even if the management interface were restricted in some other way, an attacker could use RCE to establish a callback connection to a malicious server (a reverse shell).

RCE on a Big-IP device is especially significant, because this hardware often sits right at the network perimeter, managing and encrypting all visitor traffic (acting as a WAF and a load balancer). Once Big-IP is compromised, security controls can be disabled, SSL certificates and sensitive user credentials can be extracted from memory, and the server can be used as a pivot point for further penetration deep into the organisation's internal network.

Reverse shell example
RCE scenario: the power of command execution and establishing a callback connection (reverse shell)

Practical testing (PoC)

We tested Big-IP version 17.1.0.2 without the patch (Hotfix). During testing we managed to fool the Apache validation and create a system user with administrator rights.

PoC Burp Suite screenshot
Proof of Concept: successful exploitation of the vulnerability using Burp Suite

We noticed that in some versions the user is not created immediately; the process takes a few seconds. Exploiting this vulnerability can also cause system instability.

F5 Big-IP administrator user created
F5 Big-IP administrator user created

The continuing threat, and why it is dangerous: a summary

Using the Shodan search engine, we found more than 42,000 publicly accessible Big-IP devices worldwide. Every one of them without the patch is a potential target.

Shodan search results
Shodan: publicly accessible Big-IP devices worldwide (2023 results)

Additional risk factors:

  • Exploits are available to everyone — even without deep IT security knowledge, this vulnerability can be exploited
  • The vulnerability is easy to exploit — a one-line command allows a new user to be created without any authentication, or remote commands to be run on the server (RCE)
  • The November freeze period — companies avoid infrastructure changes ahead of the biggest shopping season, so updates are postponed
  • Improper network configuration — if an internal website or system is compromised, an attacker can reach the Big-IP management interface across the data network

How can you protect yourself?

1. Update the software

Update Big-IP immediately to the latest version together with the Hotfix patch. If you use an HA (High Availability) configuration, the update can be carried out without interrupting the service.

2. Port Lockdown — Allow None

On all Self-IP addresses, set Port Lockdown to Allow None. Management access must be possible only through the dedicated Management Interface, not through the data plane Self-IP addresses.

A common mistake: organisations leave the TMUI (the management interface) reachable through Self-IP addresses on the data traffic network. This means an attacker who gets into the internal network (for example, through a compromised web server) can reach the Big-IP management interface and exploit this vulnerability.

3. DMZ configuration

  • Ensure that the Big-IP management interface cannot be reached from the DMZ
  • Check that the TMUI is not reachable from the external network
  • The separated Management Interface should be accessible only from the administration VLAN
HTTP smuggling explanation
HTTP Request Smuggling visualisation

Sources

  1. Praetorian Security — Compromising F5 BIG-IP with Request Smuggling
  2. SecurityWeek — Attackers Exploiting Critical F5 BIG-IP Vulnerability
  3. F5 — Security Advisory K000137353
  4. Portswigger — HTTP Request Smuggling

Want to know the state of your systems?

We offer to check your website free of charge for possible vulnerabilities or other security weaknesses.

Sign up for a free scan