Vulnerabilities > CVE-2019-15957 - Improper Input Validation vulnerability in Cisco products

047910
CVSS 7.2 - HIGH
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
HIGH
Confidentiality impact
HIGH
Integrity impact
HIGH
Availability impact
HIGH
network
low complexity
cisco
CWE-20
nessus

Summary

A vulnerability in the web-based management interface of certain Cisco Small Business RV Series Routers could allow an authenticated, remote attacker with administrative privileges to inject arbitrary commands into the underlying operating system. When processed, the commands will be executed with root privileges. The vulnerability is due to insufficient validation of user-supplied input. An attacker could exploit this vulnerability by providing malicious input to a specific field in the web-based management interface of an affected device. A successful exploit could allow the attacker to execute arbitrary commands on the underlying Linux operating system as the root user.

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-20191106-SBR-COMINJ.NASL
descriptionAccording to its self-reported version, Cisco Small Business RV Series Router Firmware is affected by a vulnerability. Please see the included Cisco BIDs and Cisco Security Advisory for more information
last seen2020-06-01
modified2020-06-02
plugin id131231
published2019-11-22
reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/131231
titleCisco Small Business Routers RV016, RV042, RV042G, RV082, RV320, and RV325 Command Injection Vulnerability (cisco-sa-20191106-sbr-cominj)
code
#TRUSTED a3694a9bbe9e93dbbbd60314a648f5c75a63bc7d830a78cfe491fa62f31eaa2003434a17c8d2482a6fd802ae4006d64e07d80af20f882b98d9b4484e4f36f9383d7527681ad39b1dd10636ad1521acadc4a5247ea51a5eb2f165622dd9c2ecb3fb0c6b6e427d583848ca54a856dae2b805490c0fdf3cc0010f731a3d0aa114e41e8839cd37200f25ca2c8571a59cd89000e25818fc48452b8abb0077eb23267ac4b1b9379f1318a80973c6514325cf277ad4e978f3f27f70d16465c678c3fbd4913caa12313117fdcb9733bea01946ffa3cd5fafafda8278626cde94af0ac6a64cffc559c2f91a2d61ccb71a4b41c6520ada372b2a410926b04357649de4951e98f56d453bd8aadccd60eb6b1e88a8abbc6f8667b9cf00ec85a74682ede5bb7cb50a74f791f240934aab4c62f61da4a2b87ac126e3c0222a5791b1ee4daf80931603953b3cc5c6e46249f7400a0cebbd01fb87e99cf482d50ad85b5f5dd22e680cc0128f078cbe92e4ce86866680587b2c6dafaaecddd2ee4efe80efdca5d15fa91999e88647e099539f90559f609dcfa895542098de64f32ab13d149baed3ebf93ad5f635891314bf0adb9d998e251400f05d361b594a457a7d26c7fe21e19d6ebd6826b81f7d217e23eab60d3f72c31c5edde2c31910b1b4d7fd7619df9d3b7762b4c42d13be276546e7dc8c5549976a2061caacffcd06bcc52edbe99ad4fb
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(131231);
  script_version("1.4");
  script_cvs_date("Date: 2019/12/20");

  script_cve_id("CVE-2019-15957", "CVE-2019-15990");
  script_xref(name:"CISCO-BUG-ID", value:"CSCvq76768");
  script_xref(name:"CISCO-BUG-ID", value:"CSCvr39939");
  script_xref(name:"CISCO-SA", value:"cisco-sa-20191106-sbr-cominj");
  script_xref(name:"IAVA", value:"2019-A-0429");

  script_name(english:"Cisco Small Business Routers RV016, RV042, RV042G, RV082, RV320, and RV325 Command Injection Vulnerability (cisco-sa-20191106-sbr-cominj)");

  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, Cisco Small Business RV Series Router Firmware is affected by a vulnerability.
Please see the included Cisco BIDs and Cisco Security Advisory for more information");
  # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20191106-sbr-cominj
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?38591e1a");
  script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvq76768");
  script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvr39939");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the relevant fixed version referenced in Cisco bug IDs CSCvq76768, CSCvr39939");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:S/C:C/I:C/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:L/PR:H/UI:N/S:U/C:H/I:H/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-2019-15957");

  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_cwe_id(20);

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/11/06");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/11/06");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/11/22");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:cisco:small_business_rv_series_router_firmware");
  script_set_attribute(attribute:"stig_severity", value:"I");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"CISCO");

  script_copyright(english:"This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("cisco_small_business_detect.nasl");
  script_require_keys("Cisco/Small_Business_Router/Version", "Cisco/Small_Business_Router/Device");

  exit(0);
}

include('audit.inc');
include('cisco_workarounds.inc');
include('ccf.inc');

product_info = cisco::get_product_info(name:'Cisco Small Business RV Series Router Firmware');

if (
  product_info.model !~ '^RV016($|[^0-9])' && # RV016
  product_info.model !~ '^RV042G?($|[^0-9])' && # RV042 / RV042G
  product_info.model !~ '^RV082($|[^0-9])' && # RV082
  product_info.model !~ '^RV32[05]($|[^0-9])' # RV320 / RV325
) audit(AUDIT_HOST_NOT, "an affected Cisco Small Business RV Series Router");

# RV320 and RV325 affected version < 1.5.1.05
if (product_info.model =~ '^RV32[05]($|[^0-9])')
{
  vuln_ranges = [
    { 'min_ver' : '0', 'fix_ver' : '1.5.1.05' }
  ];
}
# other models are affected version < 4.2.3.10
else
{
  vuln_ranges = [
    { 'min_ver' : '0', 'fix_ver' : '4.2.3.10' }
  ];
}

workarounds = make_list(CISCO_WORKAROUNDS['no_workaround']);
workaround_params = make_list();

reporting = make_array(
'port'     , 0,
'severity' , SECURITY_HOLE,
'version'  , product_info['version'],
'bug_id'   , 'CSCvq76768, CSCvr39939'
);

cisco::check_and_report(product_info:product_info, workarounds:workarounds, workaround_params:workaround_params, reporting:reporting, vuln_ranges:vuln_ranges,  models:make_list('RV016', 'RV042', 'RV042G', 'RV082', 'RV320', 'RV325'));