Security Advisory

CVE-2024-20399: Cisco NX-OS CLI Command Injection

Last updated:
  • CVE-2024-20399

CVE-2024-20399 is an OS command injection (CWE-78) in Cisco NX-OS configuration CLI commands: a user with Administrator credentials passes crafted arguments and runs commands as root on MDS 9000 and Nexus 3000, 5500, 5600, 6000, 7000 and 9000 switches. NVD scores it 6.7, Cisco 6.0. Velvet Ant exploited it as a zero-day; upgrade NX-OS.

Vulnerability summary

CVSS base score

6.7

Medium severity

EPSS score (FIRST)

4.3%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

Yes

Listed as known exploited

Published

Vulnerability ID: CVE-2024-20399 · Source: NVD

Affected components

ComponentCPEVersion range
Cisco NX-OS Softwarecpe:2.3:o:cisco:nx-os:*:*:*:*:*:*:*:*262 releases enumerated by NVD, from 6.0(2)A6(1) to 10.4(2); first fixed release per platform from the Cisco Software Checker (Cisco advisory cisco-sa-nxos-cmd-injection-xD9OhyOP)
Cisco MDS 9000, Nexus 5500, Nexus 5600, Nexus 6000 Series Switches—Vulnerable NX-OS releases; upgrade to the first fixed release from the Cisco Software Checker, no workarounds (Cisco advisory cisco-sa-nxos-cmd-injection-xD9OhyOP)
Cisco Nexus 3000 and Nexus 9000 (standalone NX-OS mode) Series Switches—Releases before 9.3(5); N3K-C3048TP-1GE, C3132Q-40GX, C3172PQ-10GE, C3172TQ-10GT, C3172TQ-32T, C3524P-10GX, C3548P-10GX fixed in 9.3(14); N9K-C92348GC-X fixed in 9.3(14), 10.3(6), 10.4(3) (Cisco advisory cisco-sa-nxos-cmd-injection-xD9OhyOP)
Cisco Nexus 7000 Series Switches—Vulnerable NX-OS releases; on 8.1(1) and later no extra privilege due to bash-shell (Cisco advisory cisco-sa-nxos-cmd-injection-xD9OhyOP)

What does this mean for affected devices?

Cisco's description, carried by NVD: "A vulnerability in the CLI of Cisco NX-OS Software could allow an authenticated user in possession of Administrator credentials to execute arbitrary commands as root on the underlying operating system of an affected device." It is caused by "insufficient validation of arguments that are passed to specific configuration CLI commands". NVD's Primary score is CVSS v3.1 6.7 (CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H). Cisco, the CNA, scores 6.0 (CVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:N); the difference is availability impact. Both list CWE-78, OS command injection. The record was published on 2024-07-01 (NVD, CVE record).

Which Nexus and MDS switches are affected?

Cisco's advisory cisco-sa-nxos-cmd-injection-xD9OhyOP lists MDS 9000 Series Multilayer Switches, Nexus 3000, Nexus 5500, Nexus 5600, Nexus 6000, Nexus 7000 and Nexus 9000 Series Switches in standalone NX-OS mode running a vulnerable NX-OS release. On Nexus 3000, Nexus 7000 with NX-OS 8.1(1) and later, and Nexus 9000 standalone, admins can already reach the operating system through the bash-shell feature, so the bug grants no extra privilege. It does let them run shell commands without enabling bash-shell and without the run bash syslog message, which helps hide activity. NX-OS 9.3(5) and later are not affected on Nexus 3000 and 9000, except seven Nexus 3000 models fixed in 9.3(14) and the N9K-C92348GC-X, fixed in 9.3(14), 10.3(6) and 10.4(3). Cisco confirmed that Nexus 9000 in ACI mode, Nexus 1000V, UCS fabric interconnects and Firepower appliances are not affected. NVD's CPE configuration enumerates 262 NX-OS releases from 6.0(2)A6(1) to 10.4(2).

How do you fix CVE-2024-20399?

Upgrade NX-OS. For fixed releases, Cisco's advisory points to the Cisco Software Checker, which returns the "First Fixed" release for a given platform and release. Cisco's revision of 2024-09-17 states that all fixed releases are now available. There are no workarounds. Cisco advises monitoring and frequently changing the network-admin and vdc-admin credentials and watching for unexpected configuration changes. Sygnia's report adds restricting admin access through hardened jump servers with MFA, central authentication via TACACS+, syslog forwarding and blocking outbound internet access from switches. For the code-level fix, see how to fix command injection in embedded firmware.

Is CVE-2024-20399 exploited?

Yes. Cisco says its PSIRT became aware of attempted exploitation in April 2024 and credits Sygnia, which attributed the attacks to the China-nexus group Velvet Ant deploying custom malware on Nexus switches. CISA added it to the KEV catalog on 2024-07-02 with a due date of 2024-07-23; ransomware use is "Unknown" as of 2026-11-19 (catalog version 2026.11.18). FIRST EPSS gives it 0.04306, the 91.3rd percentile, in the 2026-11-18 dataset (CISA KEV, FIRST EPSS). The CISA and FBI Secure by Design Alert on OS command injection of 10 July 2024 cites it with CVE-2024-3400 and CVE-2024-21887; our CWE Top 25 guide covers that alert.

How to fix this class of issueThis advisory's weakness class is Command injection. Our practical guide covers how to detect, fix, verify and disclose it: How to fix command injection in embedded firmware.

Evidence

  • NVD Primary CVSS v3.1 6.7 (AV:L/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H), CWE-78, published 2024-07-01; Cisco Secondary 6.0. — NVD
  • Affected platforms, bash-shell caveat, no workarounds, fixed releases via Cisco Software Checker, attempted exploitation seen in April 2024. — Cisco Security Advisory cisco-sa-nxos-cmd-injection-xD9OhyOP
  • Velvet Ant, a China-nexus group, exploited the zero-day on Cisco Nexus switches to deploy custom malware. — Sygnia
  • In CISA KEV since 2024-07-02, due 2024-07-23, known ransomware campaign use Unknown, as of 2026-11-19 (catalog version 2026.11.18). — CISA KEV
  • EPSS 0.04306, 91.3rd percentile, in the 2026-11-18 dataset. — FIRST EPSS
  • CISA and FBI Secure by Design Alert of 10 July 2024 cites CVE-2024-20399, CVE-2024-3400 and CVE-2024-21887. — CISA

Related advisories

Sources

  1. NVD
  2. Cisco Security Advisory cisco-sa-nxos-cmd-injection-xD9OhyOP: Cisco NX-OS Software CLI Command Injection Vulnerability
  3. Cisco CSAF: cisco-sa-nxos-cmd-injection-xD9OhyOP (machine-readable advisory)
  4. Cisco Software Checker
  5. Sygnia: China-Nexus Threat Group Velvet Ant Exploits Cisco 0-Day
  6. CISA and FBI: Secure by Design Alert: Eliminating OS Command Injection Vulnerabilities
  7. CVE.org record CVE-2024-20399 (CNA: Cisco)
  8. CISA KEV
  9. FIRST EPSS

Frequently asked questions

Which NX-OS release fixes CVE-2024-20399?

It depends on platform and release train, so Cisco points to the Cisco Software Checker for the first fixed release. On Nexus 3000 and standalone Nexus 9000, 9.3(5) and later are not affected, except seven Nexus 3000 models fixed in 9.3(14) and the N9K-C92348GC-X fixed in 9.3(14), 10.3(6) and 10.4(3) (per Cisco advisory cisco-sa-nxos-cmd-injection-xD9OhyOP).

Is there a workaround for CVE-2024-20399?

No. Cisco lists no workarounds; it advises monitoring and frequently changing the network-admin and vdc-admin credentials and watching for unexpected configuration changes (per Cisco advisory cisco-sa-nxos-cmd-injection-xD9OhyOP).

Why does CVE-2024-20399 matter if attackers already need admin access?

On switches without bash-shell it gives root on the underlying OS. Where bash-shell exists it adds no privilege, but it lets shell commands run without the run bash syslog message, which helps an attacker hide (per Cisco advisory cisco-sa-nxos-cmd-injection-xD9OhyOP).

Is CVE-2024-20399 exploited in the wild?

Yes. Sygnia attributed zero-day exploitation to the China-nexus group Velvet Ant, and it has been in the CISA KEV catalog since 2024-07-02, ransomware use Unknown, as of 2026-11-19 (catalog version 2026.11.18). FIRST EPSS gives it 0.04306, the 91.3rd percentile, in the 2026-11-18 dataset (per Sygnia, CISA KEV and FIRST EPSS).