vuln2shell

CatalogCisco IOS XE Web UI

Cisco IOS XE Web UI (CVE-2023-20198)

Single product cisco-ios-xe-webui

Critical privilege escalation in the Cisco IOS XE Web UI, chained with CVE-2023-20273 to install the BadCandy implant. CVSS 10.0. Actively exploited from September 2023. Both CVEs listed in CISA KEV.

PatchedKEVExploited
Aliases
CVE-2023-20198, CVE-2023-20273, BadCandy
Published
Updated

What the bug is

CVE-2023-20198 is a privilege escalation vulnerability in the web UI feature of Cisco IOS XE Software. Cisco rates it CVSS 10.0. Attackers used it to create local privilege-15 user accounts, then chained CVE-2023-20273 (CVSS 7.2 command injection) to write the BadCandy implant as root.

The web UI is exposed when ip http server or ip http secure-server is configured. Cisco Talos observed related activity as early as 18 Sep 2023, with a TAC case on 28 Sep 2023, and a second cluster creating cisco_support accounts from 12 Oct 2023. Cisco published the advisory on 16 Oct 2023. Fixed trains include 17.9.4a, 17.6.6a, 17.3.8a, and 16.12.10a (Catalyst 3650/3850).

Attack path

  1. Web UI exposedHTTP or HTTPS Web UI is enabled on an internet-facing or reachable IOS XE device.
  2. Privilege escalationCVE-2023-20198 lets an unauthenticated attacker create a local privilege-15 user.
  3. Command injectionCVE-2023-20273 elevates to root and writes the BadCandy implant under nginx config paths.
  4. Implant controlBadCandy provides implant interaction endpoints. The implant is non-persistent across reboot; local users remain.

High-level only. Not a reproduction guide.

Exploitation status

CISA KEV

Listed in CISA KEV as of .

CISA KEV catalog

CISA KEV lists CVE-2023-20198 (dateAdded 2023-10-16) and CVE-2023-20273 (dateAdded 2023-10-23).

First seen

Seen . Source: Cisco Talos

Cisco Talos later determined related activity began as early as 18 Sep 2023. A TAC case identifying unusual behavior was opened 28 Sep 2023.

What defenders should do today

Do today

  1. 1

    Disable or restrict the HTTP Server feature

    Cisco recommends no ip http server and/or no ip http secure-server on internet-facing systems, or restricting access with an HTTP access class to trusted networks, until devices are upgraded.

    Cisco advisory

  2. 2

    Upgrade to a fixed IOS XE release

    Move to first fixed releases such as 17.9.4a, 17.6.6a, 17.3.8a, or 16.12.10a (Catalyst 3650/3850), or apply the SMUs Cisco lists for 17.9.4 and 17.6.5. Use the Cisco Software Checker for platform-specific guidance.

This week

  1. 1

    Check for BadCandy and unknown local users

    Run Cisco's implant check against the Web UI, review logs for unknown users such as cisco_tac_admin or cisco_support, and remove unauthorized local accounts. Reboot clears the non-persistent implant but not the accounts.

    Cisco Talos analysis

Detection rules

Sigma

  • Exploitation Indicators Of CVE-2023-20198

    Log source: Cisco IOS XE syslog

    title: Exploitation Indicators Of CVE-2023-20198
    id: 2ece8816-b7a0-4d9b-b0e8-ae7ad18bc02b
    status: test
    description: Detecting exploitation indicators of CVE-2023-20198 a privilege escalation vulnerability in Cisco IOS XE Software Web UI.
    references:
        - https://sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-iosxe-webui-privesc-j22SaA4z
        - https://www.thestack.technology/security-experts-call-for-incident-response-exercises-after-mass-cisco-device-exploitation/
    author: Lars B. P. Frydenskov (Trifork Security)
    date: 2023-10-20
    tags:
        - attack.privilege-escalation
        - attack.initial-access
        - detection.emerging-threats
    logsource:
        product: cisco
        service: syslog
        definition: 'Requirements: Cisco IOS XE system logs needs to be configured and ingested'
    detection:
        keyword_event:
            - '%WEBUI-6-INSTALL_OPERATION_INFO:'
            - '%SYS-5-CONFIG_P:'
            - '%SEC_LOGIN-5-WEBLOGIN_SUCCESS:'
        keyword_user:
            - 'cisco_tac_admin'
            - 'cisco_support'
            - 'cisco_sys_manager'
        condition: keyword_event and keyword_user
    falsepositives:
        - Rare false positives might occur if there are valid users named "cisco_tac_admin" or "cisco_support", which are not created by default or CISCO representatives
    level: high

    By Lars B. P. Frydenskov (Trifork Security), . Source. License: DRL-1.1

SPL (Splunk)

  • Cisco IOS XE Implant Access

    Log source: Web data model (Suricata or proxy logs)

    | tstats `security_content_summariesonly`
      count min(_time) as firstTime
            max(_time) as lastTime
    
    FROM datamodel=Web WHERE
    
    Web.url="*/webui/logoutconfirm.html?logon_hash=*"
    Web.http_method=POST
    Web.status=200
    
    BY Web.http_user_agent Web.status Web.http_method
       Web.url Web.url_length Web.src Web.dest
    | `drop_dm_object_name("Web")`
    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`
    | `cisco_ios_xe_implant_access_filter`

    By Michael Haag, Splunk, . Source. License: Apache-2.0

    Uses Splunk ES macros and data models from splunk/security_content; the trailing _filter macro is a tuning hook.

  • Cisco IOS XE WebUI Programmatic Configuration

    Log source: Cisco IOS syslog

    `cisco_ios`
    facility="SYS"
    mnemonic="CONFIG_P"
    message_text="*Configured programmatically by process SEP_webui_wsma_http*"
    | rex field=_raw "process\s(?<process>\S+)\sfrom.*as\s(?<user>\S+)\son\s(?<vty>\S+)"
    | eval dest=coalesce(host, dvc, dest, "unknown")
    | stats count min(_time) as firstTime
                  max(_time) as lastTime
                  values(process) as process
                  values(vty) as vty
      by dest user
    | `security_content_ctime(firstTime)`
    | `security_content_ctime(lastTime)`
    | `cisco_ios_xe_webui_programmatic_configuration_filter`

    By Nasreddine Bencherchali, . Source. License: Apache-2.0

    Uses Splunk ES macros and data models from splunk/security_content; the trailing _filter macro is a tuning hook.

KQL (Microsoft Sentinel / Defender)

  • Cisco IOS XE web UI compromise messages (Sentinel Syslog)

    Log source: Cisco IOS XE syslog in Microsoft Sentinel (Syslog table)

    Syslog
    | where TimeGenerated > ago(30d)
    | where SyslogMessage has_any ("%SYS-5-CONFIG_P", "%SEC_LOGIN-5-WEBLOGIN_SUCCESS", "%WEBUI-6-INSTALL_OPERATION_INFO")
    | where SyslogMessage has_any ("cisco_tac_admin", "cisco_support") or SyslogMessage has "INSTALL_OPERATION_INFO"
    | project TimeGenerated, HostName, SyslogMessage

    By vuln2shell, . Source. License: CC0 1.0

    Written by vuln2shell. Untested, tune before use.

    Messages and usernames from Cisco's advisory. Any unknown local user in these messages counts, not just the two named.

LogScale (CrowdStrike)

  • Cisco IOS XE web UI compromise messages (LogScale)

    Log source: Cisco IOS XE syslog ingested into LogScale

    /%(SYS-5-CONFIG_P|SEC_LOGIN-5-WEBLOGIN_SUCCESS|WEBUI-6-INSTALL_OPERATION_INFO)/
    | /cisco_tac_admin|cisco_support|INSTALL_OPERATION_INFO/
    | groupBy([@host], function=count())

    By vuln2shell, . Source. License: CC0 1.0

    Written by vuln2shell. Untested, tune before use.

    Same logic as the KQL version.

Suricata / Snort

  • ET MALWARE BadCandy Cisco IOS XE Implant Check-in

    Log source: Suricata IDS alerts (ET Open ruleset)

    alert http $EXTERNAL_NET any -> [$HOME_NET,$HTTP_SERVERS] any (msg:"ET MALWARE BadCandy Cisco IOS XE Implant Check-in"; flow:established,to_server; urilen:38; http.method; content:"POST"; http.uri; content:"/webui/logoutconfirm.html?logon_hash=1"; fast_pattern; threshold:type limit,seconds 300,count 1,track by_src; reference:url,blog.talosintelligence.com/active-exploitation-of-cisco-ios-xe-software/; reference:cve,2023-20198; classtype:trojan-activity; sid:2048584; rev:3; metadata:affected_product Cisco_IOS, attack_target Web_Server, created_at 2023_10_17, cve CVE_2023_20198, deployment Perimeter, deployment Internet, deployment SSLDecrypt, former_category EXPLOIT, confidence High, signature_severity Major, tag CISA_KEV, tag Description_Generated_By_Proofpoint_Nexus, updated_at 2026_10_21, reviewed_at 2024_01_26; target:dest_ip;)

    By Emerging Threats (Proofpoint), . Source. License: BSD-3-Clause (ET Open, sids 2000000-2799999)

  • ET EXPLOIT Cisco IOS XE Web UI Command Injection Vulnerability (CVE-2023-20273)

    Log source: Suricata IDS alerts (ET Open ruleset)

    alert http any any -> [$HOME_NET,$HTTP_SERVERS] any (msg:"ET EXPLOIT Cisco IOS XE Web UI Command Injection Vulnerability (CVE-2023-20273)"; flow:established,to_server; http.method; content:"POST"; http.uri; content:"/webui/rest/softwareMgmt/installAdd"; startswith; nocase; fast_pattern; http.cookie; content:"Auth="; startswith; http.header_names; to_lowercase; content:"|0d 0a|x-csrf-token|0d 0a|"; nocase; http.request_body; content:"|22|ipaddress|22|"; nocase; content:"|22|"; within:5; content:"|3a|"; within:5; content:"|3a|"; within:5; content:"|3a|"; within:5; pcre:"/^.{0,5}(?:[\x60\x3b\x7c\x26]|%60|%3b|%7c|%26|(?:[\x3c\x3e\x24]|%3c|%3e|%24)(?:\x28|%28))/R"; reference:url,blog.leakix.net/2023/10/cisco-root-privesc/; reference:url,twitter.com/joel_land/status/1719708750741639539; reference:url,sec.cloudapps.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-iosxe-webui-privesc-j22SaA4z; reference:cve,2023-20273; classtype:attempted-admin; sid:2049007; rev:2; metadata:affected_product Cisco_IOS, attack_target Networking_Equipment, created_at 2023_11_01, cve CVE_2023_20273, deployment Perimeter, deployment SSLDecrypt, performance_impact Low, confidence High, signature_severity Critical, tag CISA_KEV, tag Description_Generated_By_Proofpoint_Nexus, updated_at 2024_04_27, reviewed_at 2023_11_01, mitre_tactic_id TA0008, mitre_tactic_name Lateral_Movement, mitre_technique_id T1210, mitre_technique_name Exploitation_Of_Remote_Services; target:dest_ip;)

    By Emerging Threats (Proofpoint), . Source. License: BSD-3-Clause (ET Open, sids 2000000-2799999)

    Needs decrypted HTTP to the device web UI.

More detection content

Vendor signatures

Vendor signatures
SignalLog sourceWhat to look for
Snort rules 3:50118 / 3:62527-62529 / 3:62541-62542Snort / Cisco IPS event logsCisco Talos published Snort rule IDs covering implant installation, implant interaction, and initial-access attempts for these CVEs.

Affected versions

Cisco IOS XE Software (Web UI enabled)

Product version table
VersionStatusAdvisory
IOS XE 17.9 trainAffected

Cisco IOS XE Software Release Train 17.9 first fixed release 17.9.4a (available).

Source
IOS XE 17.6 trainAffected

Cisco IOS XE Software Release Train 17.6 first fixed release 17.6.6a (available).

Source
IOS XE 17.3 trainAffected

Cisco IOS XE Software Release Train 17.3 first fixed release 17.3.8a (available).

Source
IOS XE 16.12 (Catalyst 3650/3850)Affected

16.12 (Catalyst 3650 and 3850 only) first fixed release 16.12.10a (available).

Source
IOS XE prior to Release 16 / IOS / ASA / FTD / ISE / NX-OSVendor stated not affected

Cisco has confirmed that these vulnerabilities do not affect ASA Software, FTD Software, ISE, IOS Software, IOS XE Software prior to Release 16, or NX-OS Software.

Source

Timeline7

Key events

Newest first.

  1. PoC

    Horizon3 publishes a deep dive and PoC discussion for CVE-2023-20198.

    Source
  2. KEV

    CISA adds CVE-2023-20273 to KEV.

    Source
  3. Patch

    Cisco begins rolling out fixes for CVE-2023-20198 and CVE-2023-20273.

    Source
  4. KEV

    Cisco publishes the advisory. CISA adds CVE-2023-20198 to KEV.

    Source
  5. Exploited

    Second cluster observed creating local user cisco_support from suspicious infrastructure.

    Source
  6. Exploited

    Cisco TAC case opened after unusual behavior on a customer device.

    Source
  7. Exploited

    Cisco Talos later assesses related malicious activity began as early as this date.

    Source
Full timeline (7)
Mon 30 Oct 20231
  1. PoC

    Horizon3 publishes a deep dive and PoC discussion for CVE-2023-20198.

    Source
Mon 23 Oct 20231
  1. KEV

    CISA adds CVE-2023-20273 to KEV.

    Source
Sun 22 Oct 20231
  1. Patch

    Cisco begins rolling out fixes for CVE-2023-20198 and CVE-2023-20273.

    Source
Mon 16 Oct 20231
  1. KEV

    Cisco publishes the advisory. CISA adds CVE-2023-20198 to KEV.

    Source
Thu 12 Oct 20231
  1. Exploited

    Second cluster observed creating local user cisco_support from suspicious infrastructure.

    Source
Thu 28 Sep 20231
  1. Exploited

    Cisco TAC case opened after unusual behavior on a customer device.

    Source
Mon 18 Sep 20231
  1. Exploited

    Cisco Talos later assesses related malicious activity began as early as this date.

    Source

News & write-ups

PoC index (for defenders)

Public proof-of-concept links for defensive validation, with a source and a validation status.

Horizon3 published a deep dive and PoC discussion on 30 Oct 2023. Cisco published implant-presence check commands rather than an exploit PoC. No separate public exploit repository is indexed here.

Open questions

No open questions recorded.

Original research

Email alerts coming soon

We’re not sending mail yet. Follow the catalog with RSS or the JSON feed.

Email alerts unavailable

Email signup is disabled until a mail provider is configured.

RSSJSON feed