Vulnerabilities > CVE-2017-3850 - Improper Input Validation vulnerability in Cisco IOS and IOS XE

047910
CVSS 5.9 - MEDIUM
Attack vector
NETWORK
Attack complexity
HIGH
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
NONE
Availability impact
HIGH
network
high complexity
cisco
CWE-20
nessus

Summary

A vulnerability in the Autonomic Networking Infrastructure (ANI) feature of Cisco IOS Software (15.4 through 15.6) and Cisco IOS XE Software (3.7 through 3.18, and 16) could allow an unauthenticated, remote attacker to cause a denial of service (DoS) condition. The vulnerability is due to incomplete input validation on certain crafted packets. An attacker could exploit this vulnerability by sending a crafted IPv6 packet to a device that is running a Cisco IOS Software or Cisco IOS XE Software release that supports the ANI feature. A device must meet two conditions to be affected by this vulnerability: (1) the device must be running a version of Cisco IOS Software or Cisco IOS XE Software that supports ANI (regardless of whether ANI is configured); and (2) the device must have a reachable IPv6 interface. An exploit could allow the attacker to cause the affected device to reload. Cisco Bug IDs: CSCvc42729.

Vulnerable Configurations

Part Description Count
OS
Cisco
143

Common Weakness Enumeration (CWE)

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Buffer Overflow via Environment Variables
    This attack pattern involves causing a buffer overflow through manipulation of environment variables. Once the attacker finds that they can modify an environment variable, they may try to overflow associated buffers. This attack leverages implicit trust often placed in environment variables.
  • Server Side Include (SSI) Injection
    An attacker can use Server Side Include (SSI) Injection to send code to a web application that then gets executed by the web server. Doing so enables the attacker to achieve similar results to Cross Site Scripting, viz., arbitrary code execution and information disclosure, albeit on a more limited scale, since the SSI directives are nowhere near as powerful as a full-fledged scripting language. Nonetheless, the attacker can conveniently gain access to sensitive files, such as password files, and execute shell commands.
  • Cross Zone Scripting
    An attacker is able to cause a victim to load content into their web-browser that bypasses security zone controls and gain access to increased privileges to execute scripting code or other web objects such as unsigned ActiveX controls or applets. This is a privilege elevation attack targeted at zone-based web-browser security. In a zone-based model, pages belong to one of a set of zones corresponding to the level of privilege assigned to that page. Pages in an untrusted zone would have a lesser level of access to the system and/or be restricted in the types of executable content it was allowed to invoke. In a cross-zone scripting attack, a page that should be assigned to a less privileged zone is granted the privileges of a more trusted zone. This can be accomplished by exploiting bugs in the browser, exploiting incorrect configuration in the zone controls, through a cross-site scripting attack that causes the attackers' content to be treated as coming from a more trusted page, or by leveraging some piece of system functionality that is accessible from both the trusted and less trusted zone. This attack differs from "Restful Privilege Escalation" in that the latter correlates to the inadequate securing of RESTful access methods (such as HTTP DELETE) on the server, while cross-zone scripting attacks the concept of security zones as implemented by a browser.
  • Cross Site Scripting through Log Files
    An attacker may leverage a system weakness where logs are susceptible to log injection to insert scripts into the system's logs. If these logs are later viewed by an administrator through a thin administrative interface and the log data is not properly HTML encoded before being written to the page, the attackers' scripts stored in the log will be executed in the administrative interface with potentially serious consequences. This attack pattern is really a combination of two other attack patterns: log injection and stored cross site scripting.
  • Command Line Execution through SQL Injection
    An attacker uses standard SQL injection methods to inject data into the command line for execution. This could be done directly through misuse of directives such as MSSQL_xp_cmdshell or indirectly through injection of data into the database that would be interpreted as shell commands. Sometime later, an unscrupulous backend application (or could be part of the functionality of the same application) fetches the injected data stored in the database and uses this data as command line arguments without performing proper validation. The malicious data escapes that data plane by spawning new commands to be executed on the host.

Nessus

  • NASL familyCISCO
    NASL idCISCO-SA-20170320-ANIIPV6-IOSXE.NASL
    descriptionAccording to its self-reported version, the Cisco IOS XE software running on the remote device is affected by a denial of service vulnerability in the Autonomic Networking Infrastructure (ANI) component due to incomplete input validation of certain crafted IPv6 packets. An unauthenticated, remote attacker can exploit this issue, via specially crafted IPv6 packets, to cause the device to reload. Note that this issue only affect devices with ANI enabled that have a reachable IPv6 interface.
    last seen2020-04-30
    modified2017-03-24
    plugin id97946
    published2017-03-24
    reporterThis script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/97946
    titleCisco IOS XE ANI IPv6 Packets DoS (cisco-sa-20170320-aniipv6)
    code
    #TRUSTED 4e64bae2ca26c733b845bff3922ab3e47438ed9642d59987c56292e9bb6737972abb291188caac81cdbf1dfe4642a70e725aea0316854d61b8b8bac50ffa2f1cdd18628734905d5d8228d8d38d423ec2c4bad3a2f7dd2305410ce3d86f07e34d4c4e43c20afabdf2bd039325860f6fb3b6ec52799e17f4a26d9314c5378e4a3cf0bfab9209092a0b4737dcff30f3a687f7aae2a4fc83933bb013e7cdfb66ff209d1d2c11914f945da98677ee8e675e70affa7514eb83d4a99c7154a964f9a8ba68eb367b23c25dce9a6568a84dc4eb2c843a395a70ba67c919b8c0652a3ec317d65c494fc17d436d9c2b8cd5d59ba09b4bd07cd8e2fc4335ad8ec28fdb83c2a42d54fd1cb6fb436d09a00f2fc72703d1515aa21d01a4d262ae244cfabb7125b2ff6fafbc072a2973a08bab7a76cdd685a6e26d29c43755eeab228ebabf8c53b44be6598cc490aecce7c9b353ec2aebeff9dd1a3eb2174fa4821b7807612d38c6360701ef3d10b8ba3d336db72a679f473a34e49daafe688cfb4e079ecbd0223ded248b250fffe60e14281f89f45dac9f9e2c37637bff0e331270acbd3fbbd6d2dc301f18cf35c184f867a7f81aaa28b1551a9f3654bc2b1a2ab9103c3157e3b0cb7b98e254f5186af864f46bd3414abc158b67284a9c1b349639d22dc5eb2d061fb0364495a4067acfc948509eb54c5a2e68fc4b16e55d562d72327f2a8ffd61
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(97946);
      script_version("1.12");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/27");
    
      script_cve_id("CVE-2017-3850");
      script_bugtraq_id(96971);
      script_xref(name:"CISCO-BUG-ID", value:"CSCvc42729");
      script_xref(name:"CISCO-SA", value:"cisco-sa-20170320-aniipv6");
    
      script_name(english:"Cisco IOS XE ANI IPv6 Packets DoS (cisco-sa-20170320-aniipv6)");
      script_summary(english:"Checks the IOS XE version.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote device is missing a vendor-supplied security patch.");
      script_set_attribute(attribute:"description", value:
    "According to its self-reported version, the Cisco IOS XE software
    running on the remote device is affected by a denial of service
    vulnerability in the Autonomic Networking Infrastructure (ANI)
    component due to incomplete input validation of certain crafted IPv6
    packets. An unauthenticated, remote attacker can exploit this issue,
    via specially crafted IPv6 packets, to cause the device to reload.
    
    Note that this issue only affect devices with ANI enabled that have a
    reachable IPv6 interface.");
      # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20170320-aniipv6
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?8d249229");
      script_set_attribute(attribute:"solution", value:
    "Apply the relevant patch referenced in Cisco Security Advisory
    cisco-sa-20170320-aniipv6.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:N/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2017-3850");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2017/03/20");
      script_set_attribute(attribute:"patch_publication_date", value:"2017/03/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/03/24");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:ios_xe");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CISCO");
    
      script_copyright(english:"This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("cisco_ios_xe_version.nasl");
      script_require_keys("Host/Cisco/IOS-XE/Version");
    
      exit(0);
    }
    
    include("audit.inc");
    include("cisco_workarounds.inc");
    include("ccf.inc");
    
    product_info = cisco::get_product_info(name:"Cisco IOS XE Software");
    
    version_list = make_list(
      '3.10.0S',
      '3.10.1S',
      '3.10.2S',
      '3.10.3S',
      '3.10.4S',
      '3.10.5S',
      '3.10.6S',
      '3.10.7S',
      '3.10.1xbS',
      '3.10.8S',
      '3.11.1S',
      '3.11.2S',
      '3.11.0S',
      '3.11.3S',
      '3.11.4S',
      '3.12.1S',
      '3.12.2S',
      '3.12.3S',
      '3.12.0aS',
      '3.12.4S',
      '3.13.0S',
      '3.13.1S',
      '3.13.2S',
      '3.13.3S',
      '3.13.4S',
      '3.13.5S',
      '3.13.0aS',
      '3.13.5aS',
      '3.13.6S',
      '3.13.6aS',
      '3.14.0S',
      '3.14.1S',
      '3.14.2S',
      '3.14.3S',
      '3.14.4S',
      '3.15.0S',
      '3.15.1S',
      '3.15.2S',
      '3.15.1cS',
      '3.15.3S',
      '3.15.4S',
      '3.7.0E',
      '3.7.1E',
      '3.7.2E',
      '3.7.3E',
      '3.7.4E',
      '3.7.5E',
      '3.16.0S',
      '3.16.1S',
      '3.16.1aS',
      '3.16.2S',
      '3.16.2aS',
      '3.16.0cS',
      '3.16.3S',
      '3.16.2bS',
      '3.16.3aS',
      '3.16.4S',
      '3.16.4aS',
      '3.16.4bS',
      '3.16.5S',
      '3.16.4dS',
      '3.17.0S',
      '3.17.1S',
      '3.17.2S ',
      '3.17.1aS',
      '3.17.3S',
      '3.8.0E',
      '3.8.1E',
      '3.8.2E',
      '3.8.3E',
      '3.18.0aS',
      '3.18.0S',
      '3.18.1S',
      '3.18.2S',
      '3.18.3vS',
      '3.18.0SP',
      '3.18.1SP',
      '3.18.1aSP',
      '3.18.1bSP',
      '3.9.0E',
      '3.9.1E'
      );
    
    workarounds = make_list(CISCO_WORKAROUNDS['ipv6_enabled']);
    workaround_params = make_list();
    
    reporting = make_array(
      'port'     , 0,
      'severity' , SECURITY_HOLE,
      'version'  , product_info['version'],
      'bug_id'   , "CSCvc42729",
      'cmds'     , make_list("show running-config")
    );
    
    cisco::check_and_report(product_info:product_info, workarounds:workarounds, workaround_params:workaround_params, reporting:reporting, vuln_versions:version_list);
    
  • NASL familyCISCO
    NASL idCISCO-SA-20170320-ANIIPV6-IOS.NASL
    descriptionAccording to its self-reported version, the Cisco IOS software running on the remote device is affected by a denial of service vulnerability in the Autonomic Networking Infrastructure (ANI) component due to incomplete input validation of certain crafted IPv6 packets. An unauthenticated, remote attacker can exploit this issue, via specially crafted IPv6 packets, to cause the device to reload. Note that this issue only affect devices with ANI enabled that have a reachable IPv6 interface.
    last seen2020-04-30
    modified2017-03-24
    plugin id97945
    published2017-03-24
    reporterThis script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
    sourcehttps://www.tenable.com/plugins/nessus/97945
    titleCisco IOS ANI IPv6 Packets DoS (cisco-sa-20170320-aniipv6)
    code
    #TRUSTED 4161c7fd376e9ceb77c4134c55a6d88b356f727e2bc6fa311a0dcaae6c76d8be55da3372d5d683c6aa43301abb00aa0eb8ed8fdfe160a1d015f38673c1a02371b319cc9e6b84d3227bbec973816373b46b2d14dd8df9290d744e38139aeee028fd54c75516d172b9c37458815c256454c18c1af9b48a3aaf7ec14aeb803e3de7ba909093d3ec2b212e839001cf72988ff32f1953fcb16cef9a72086e3fbb963b750890aca1f3d308fd5fd0a8c798d9c4825ad89210b72c651853dbdee2493d94ae325f797a0d1cb7b6c5ec96299dad0fd267817a5d1d5283dba3a2c62b40175e3948fd9135a28528241fc398d604d6112fd580d4187a2bc708951663394b02e177c2319da96a98fc0f1f5e5d0c508418ec6ebdd3ac49a78080e8c9fe01aa573dc499bc23c5529ef6e162481d089d895adaa36a196d81fb7a91e243f83fa12bb7e318401bb260c69342ef21e8351f352a3efb49f3e4929d23ebb8a1c6a735c834e5c67a659b0bbc3796af7f2baf523d0603d066ddf22c0dc1c36e85cdef089d21b91af036a4d237572f5199c7c9c7ee87accf5f588e4ed7919308ff813ae0e05660770f085dc89c1e70d64f358f3b521c12f6fb56fc32f476c15d4af2ffca208c89e3c2f40f119f0229da7fc5bcbd3c56b89dfa64e7788a5a011ef445c0df7c32980fff2cac2e43c1236efc514218a9dbe137da7dce2aa1bd011046767a4f5732
    #
    # (C) Tenable Network Security, Inc.
    #
    
    include("compat.inc");
    
    if (description)
    {
      script_id(97945);
      script_version("1.12");
      script_set_attribute(attribute:"plugin_modification_date", value:"2020/04/27");
    
      script_cve_id("CVE-2017-3850");
      script_bugtraq_id(96971);
      script_xref(name:"CISCO-BUG-ID", value:"CSCvc42729");
      script_xref(name:"CISCO-SA", value:"cisco-sa-20170320-aniipv6");
    
      script_name(english:"Cisco IOS ANI IPv6 Packets DoS (cisco-sa-20170320-aniipv6)");
      script_summary(english:"Checks the IOS version.");
    
      script_set_attribute(attribute:"synopsis", value:
    "The remote device is missing a vendor-supplied security patch.");
      script_set_attribute(attribute:"description", value:
    "According to its self-reported version, the Cisco IOS software running
    on the remote device is affected by a denial of service vulnerability
    in the Autonomic Networking Infrastructure (ANI) component due to
    incomplete input validation of certain crafted IPv6 packets. An
    unauthenticated, remote attacker can exploit this issue, via specially
    crafted IPv6 packets, to cause the device to reload.
    
    Note that this issue only affect devices with ANI enabled that have a
    reachable IPv6 interface.");
      # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20170320-aniipv6
      script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?8d249229");
      script_set_attribute(attribute:"solution", value:
    "Apply the relevant patch referenced in Cisco Security Advisory
    cisco-sa-20170320-aniipv6.");
      script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:N/A:C");
      script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
      script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H");
      script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
      script_set_attribute(attribute:"cvss_score_source", value:"CVE-2017-3850");
    
      script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
    
      script_set_attribute(attribute:"vuln_publication_date", value:"2017/03/20");
      script_set_attribute(attribute:"patch_publication_date", value:"2017/03/20");
      script_set_attribute(attribute:"plugin_publication_date", value:"2017/03/24");
    
      script_set_attribute(attribute:"plugin_type", value:"local");
      script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:ios");
      script_end_attributes();
    
      script_category(ACT_GATHER_INFO);
      script_family(english:"CISCO");
    
      script_copyright(english:"This script is Copyright (C) 2017-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
    
      script_dependencies("cisco_ios_version.nasl");
      script_require_keys("Host/Cisco/IOS/Version");
    
      exit(0);
    }
    
    include("audit.inc");
    include("cisco_workarounds.inc");
    include("ccf.inc");
    
    product_info = cisco::get_product_info(name:"Cisco IOS");
    
    version_list = make_list(
      '15.3(3)S',
      '15.3(3)S1',
      '15.3(3)S2',
      '15.3(3)S3',
      '15.3(3)S6',
      '15.3(3)S4',
      '15.3(3)S5',
      '15.2(3)E',
      '15.2(4)E',
      '15.2(3)E1',
      '15.2(3)E2',
      '15.2(3)E3',
      '15.2(4)E1',
      '15.2(4)E2',
      '15.2(5)E',
      '15.2(5b)E',
      '15.4(1)S',
      '15.4(3)S',
      '15.4(1)S1',
      '15.4(1)S2',
      '15.4(2)S1',
      '15.4(1)S3',
      '15.4(3)S1',
      '15.4(2)S2',
      '15.4(3)S2',
      '15.4(3)S3',
      '15.4(1)S4',
      '15.4(2)S3',
      '15.4(2)S4',
      '15.4(3)S4',
      '15.4(3)S5',
      '15.4(3)S6',
      '15.5(1)S',
      '15.5(2)S',
      '15.5(1)S1',
      '15.5(3)S',
      '15.5(1)S2',
      '15.5(1)S3',
      '15.5(2)S1',
      '15.5(2)S2',
      '15.5(3)S1',
      '15.5(3)S1a',
      '15.5(2)S3',
      '15.5(3)S2',
      '15.5(3)S0a',
      '15.5(3)S3',
      '15.5(1)S4',
      '15.5(3)SN',
      '15.6(1)S',
      '15.6(2)S',
      '15.6(2)S1',
      '15.6(1)S1',
      '15.6(1)S2',
      '15.6(1)T',
      '15.6(2)T',
      '15.6(1)T0a',
      '15.6(1)T1',
      '15.6(2)T1',
      '15.6(1)T2',
      '15.6(2)T2',
      '15.6(2)SN',
      '15.6(3)M'
      );
    
    workarounds = make_list(CISCO_WORKAROUNDS['ipv6_enabled']);
    workaround_params = make_list();
    
    reporting = make_array(
      'port'     , 0,
      'severity' , SECURITY_HOLE,
      'version'  , product_info['version'],
      'bug_id'   , "CSCvc42729",
      'cmds'     , make_list("show running-config")
    );
    
    cisco::check_and_report(product_info:product_info, workarounds:workarounds, workaround_params:workaround_params, reporting:reporting, vuln_versions:version_list);