Vulnerabilities > CVE-2019-6679 - Link Following vulnerability in F5 products

047910
CVSS 3.6 - LOW
Attack vector
LOCAL
Attack complexity
LOW
Privileges required
NONE
Confidentiality impact
NONE
Integrity impact
PARTIAL
Availability impact
PARTIAL
local
low complexity
f5
CWE-59
nessus

Summary

On BIG-IP versions 15.0.0-15.0.1, 14.1.0.2-14.1.2.2, 14.0.0.5-14.0.1, 13.1.1.5-13.1.3.1, 12.1.4.1-12.1.5, 11.6.4-11.6.5, and 11.5.9-11.5.10, the access controls implemented by scp.whitelist and scp.blacklist are not properly enforced for paths that are symlinks. This allows authenticated users with SCP access to overwrite certain configuration files that would otherwise be restricted.

Vulnerable Configurations

Part Description Count
Application
F5
613

Common Attack Pattern Enumeration and Classification (CAPEC)

  • Symlink Attack
    An attacker positions a symbolic link in such a manner that the targeted user or application accesses the link's endpoint, assuming that it is accessing a file with the link's name. The endpoint file may be either output or input. If the file is output, the result is that the endpoint is modified, instead of a file at the intended location. Modifications to the endpoint file may include appending, overwriting, corrupting, changing permissions, or other modifications. In some variants of this attack the attacker may be able to control the change to a file while in other cases they cannot. The former is especially damaging since the attacker may be able to grant themselves increased privileges or insert false information, but the latter can also be damaging as it can expose sensitive information or corrupt or destroy vital system or application files. Alternatively, the endpoint file may serve as input to the targeted application. This can be used to feed malformed input into the target or to cause the target to process different information, possibly allowing the attacker to control the actions of the target or to cause the target to expose information to the attacker. Moreover, the actions taken on the endpoint file are undertaken with the permissions of the targeted user or application, which may exceed the permissions that the attacker would normally have.
  • Accessing, Modifying or Executing Executable Files
    An attack of this type exploits a system's configuration that allows an attacker to either directly access an executable file, for example through shell access; or in a possible worst case allows an attacker to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
  • Leverage Executable Code in Non-Executable Files
    An attack of this type exploits a system's trust in configuration and resource files, when the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high. The attack can be directed at a client system, such as causing buffer overrun through loading seemingly benign image files, as in Microsoft Security Bulletin MS04-028 where specially crafted JPEG files could cause a buffer overrun once loaded into the browser. Another example targets clients reading pdf files. In this case the attacker simply appends javascript to the end of a legitimate url for a pdf (http://www.gnucitizen.org/blog/danger-danger-danger/) http://path/to/pdf/file.pdf#whatever_name_you_want=javascript:your_code_here The client assumes that they are reading a pdf, but the attacker has modified the resource and loaded executable javascript into the client's browser process. The attack can also target server processes. The attacker edits the resource or configuration file, for example a web.xml file used to configure security permissions for a J2EE app server, adding role name "public" grants all users with the public role the ability to use the administration functionality. The server trusts its configuration file to be correct, but when they are manipulated, the attacker gains full control.
  • Manipulating Input to File System Calls
    An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.

Nessus

NASL familyF5 Networks Local Security Checks
NASL idF5_BIGIP_SOL54336216.NASL
descriptionThe system does not properly enforce the access controls for the scp.whitelist and scp.blacklist files whenpaths are symbolic links (symlinks). This allows authenticated users with Secure Copy (SCP) protocol access to overwrite certain configuration files that would otherwise be restricted. (CVE-2019-6679) Impact BIG-IP Authenticated users with access to the Secure Copy utility ( scp ), which is an OpenSSH tool, but without full file systemor Advanced Shell ( bash )access, can overwrite certain configuration files. BIG-IQ / Enterprise Manager / Traffix SDC There is no impact; these F5 products are not affected by this vulnerability.
last seen2020-06-01
modified2020-06-02
plugin id132570
published2019-12-31
reporterThis script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.
sourcehttps://www.tenable.com/plugins/nessus/132570
titleF5 Networks BIG-IP : SCP vulnerability (K54336216)
code
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from F5 Networks BIG-IP Solution K54336216.
#
# The text description of this plugin is (C) F5 Networks.
#

include("compat.inc");

if (description)
{
  script_id(132570);
  script_version("1.4");
  script_cvs_date("Date: 2020/02/12");

  script_cve_id("CVE-2019-6679");

  script_name(english:"F5 Networks BIG-IP : SCP vulnerability (K54336216)");
  script_summary(english:"Checks the BIG-IP version.");

  script_set_attribute(
    attribute:"synopsis", 
    value:"The remote device is missing a vendor-supplied security patch."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"The system does not properly enforce the access controls for the
scp.whitelist and scp.blacklist files whenpaths are symbolic links
(symlinks). This allows authenticated users with Secure Copy (SCP)
protocol access to overwrite certain configuration files that would
otherwise be restricted. (CVE-2019-6679)

Impact

BIG-IP

Authenticated users with access to the Secure Copy utility ( scp ),
which is an OpenSSH tool, but without full file systemor Advanced
Shell ( bash )access, can overwrite certain configuration files.

BIG-IQ / Enterprise Manager / Traffix SDC

There is no impact; these F5 products are not affected by this
vulnerability."
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://support.f5.com/csp/article/K54336216"
  );
  script_set_attribute(
    attribute:"solution", 
    value:
"Upgrade to one of the non-vulnerable versions listed in the F5
Solution K54336216."
  );
  script_set_cvss_base_vector("CVSS2#AV:L/AC:L/Au:N/C:N/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-6679");
  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");

  script_set_attribute(attribute:"potential_vulnerability", value:"true");
  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_access_policy_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_advanced_firewall_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_application_acceleration_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_application_security_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_application_visibility_and_reporting");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_global_traffic_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_link_controller");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_local_traffic_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_policy_enforcement_manager");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:f5:big-ip_webaccelerator");
  script_set_attribute(attribute:"cpe", value:"cpe:/h:f5:big-ip");

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/12/23");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/12/19");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/12/31");
  script_set_attribute(attribute:"generated_plugin", value:"current");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2019-2020 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_family(english:"F5 Networks Local Security Checks");

  script_dependencies("f5_bigip_detect.nbin");
  script_require_keys("Host/local_checks_enabled", "Host/BIG-IP/hotfix", "Host/BIG-IP/modules", "Host/BIG-IP/version", "Settings/ParanoidReport");

  exit(0);
}


include("f5_func.inc");

if ( ! get_kb_item("Host/local_checks_enabled") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
version = get_kb_item("Host/BIG-IP/version");
if ( ! version ) audit(AUDIT_OS_NOT, "F5 Networks BIG-IP");
if ( isnull(get_kb_item("Host/BIG-IP/hotfix")) ) audit(AUDIT_KB_MISSING, "Host/BIG-IP/hotfix");
if ( ! get_kb_item("Host/BIG-IP/modules") ) audit(AUDIT_KB_MISSING, "Host/BIG-IP/modules");

sol = "K54336216";
vmatrix = make_array();

if (report_paranoia < 2) audit(AUDIT_PARANOID);

# AFM
vmatrix["AFM"] = make_array();
vmatrix["AFM"]["affected"  ] = make_list("15.0.0-15.0.1","14.1.0.2-14.1.2","14.0.0.5-14.0.1","13.1.1.5-13.1.3","12.1.4.1-12.1.5","11.6.4-11.6.5","11.5.9-11.5.10");
vmatrix["AFM"]["unaffected"] = make_list("15.1.0","15.0.1.1","14.1.2.3","14.0.1.1","13.1.3.2","12.1.5.1","11.6.5.1");

# AM
vmatrix["AM"] = make_array();
vmatrix["AM"]["affected"  ] = make_list("15.0.0-15.0.1","14.1.0.2-14.1.2","14.0.0.5-14.0.1","13.1.1.5-13.1.3","12.1.4.1-12.1.5","11.6.4-11.6.5","11.5.9-11.5.10");
vmatrix["AM"]["unaffected"] = make_list("15.1.0","15.0.1.1","14.1.2.3","14.0.1.1","13.1.3.2","12.1.5.1","11.6.5.1");

# APM
vmatrix["APM"] = make_array();
vmatrix["APM"]["affected"  ] = make_list("15.0.0-15.0.1","14.1.0.2-14.1.2","14.0.0.5-14.0.1","13.1.1.5-13.1.3","12.1.4.1-12.1.5","11.6.4-11.6.5","11.5.9-11.5.10");
vmatrix["APM"]["unaffected"] = make_list("15.1.0","15.0.1.1","14.1.2.3","14.0.1.1","13.1.3.2","12.1.5.1","11.6.5.1");

# ASM
vmatrix["ASM"] = make_array();
vmatrix["ASM"]["affected"  ] = make_list("15.0.0-15.0.1","14.1.0.2-14.1.2","14.0.0.5-14.0.1","13.1.1.5-13.1.3","12.1.4.1-12.1.5","11.6.4-11.6.5","11.5.9-11.5.10");
vmatrix["ASM"]["unaffected"] = make_list("15.1.0","15.0.1.1","14.1.2.3","14.0.1.1","13.1.3.2","12.1.5.1","11.6.5.1");

# AVR
vmatrix["AVR"] = make_array();
vmatrix["AVR"]["affected"  ] = make_list("15.0.0-15.0.1","14.1.0.2-14.1.2","14.0.0.5-14.0.1","13.1.1.5-13.1.3","12.1.4.1-12.1.5","11.6.4-11.6.5","11.5.9-11.5.10");
vmatrix["AVR"]["unaffected"] = make_list("15.1.0","15.0.1.1","14.1.2.3","14.0.1.1","13.1.3.2","12.1.5.1","11.6.5.1");

# GTM
vmatrix["GTM"] = make_array();
vmatrix["GTM"]["affected"  ] = make_list("15.0.0-15.0.1","14.1.0.2-14.1.2","14.0.0.5-14.0.1","13.1.1.5-13.1.3","12.1.4.1-12.1.5","11.6.4-11.6.5","11.5.9-11.5.10");
vmatrix["GTM"]["unaffected"] = make_list("15.1.0","15.0.1.1","14.1.2.3","14.0.1.1","13.1.3.2","12.1.5.1","11.6.5.1");

# LC
vmatrix["LC"] = make_array();
vmatrix["LC"]["affected"  ] = make_list("15.0.0-15.0.1","14.1.0.2-14.1.2","14.0.0.5-14.0.1","13.1.1.5-13.1.3","12.1.4.1-12.1.5","11.6.4-11.6.5","11.5.9-11.5.10");
vmatrix["LC"]["unaffected"] = make_list("15.1.0","15.0.1.1","14.1.2.3","14.0.1.1","13.1.3.2","12.1.5.1","11.6.5.1");

# LTM
vmatrix["LTM"] = make_array();
vmatrix["LTM"]["affected"  ] = make_list("15.0.0-15.0.1","14.1.0.2-14.1.2","14.0.0.5-14.0.1","13.1.1.5-13.1.3","12.1.4.1-12.1.5","11.6.4-11.6.5","11.5.9-11.5.10");
vmatrix["LTM"]["unaffected"] = make_list("15.1.0","15.0.1.1","14.1.2.3","14.0.1.1","13.1.3.2","12.1.5.1","11.6.5.1");

# PEM
vmatrix["PEM"] = make_array();
vmatrix["PEM"]["affected"  ] = make_list("15.0.0-15.0.1","14.1.0.2-14.1.2","14.0.0.5-14.0.1","13.1.1.5-13.1.3","12.1.4.1-12.1.5","11.6.4-11.6.5","11.5.9-11.5.10");
vmatrix["PEM"]["unaffected"] = make_list("15.1.0","15.0.1.1","14.1.2.3","14.0.1.1","13.1.3.2","12.1.5.1","11.6.5.1");

# WAM
vmatrix["WAM"] = make_array();
vmatrix["WAM"]["affected"  ] = make_list("15.0.0-15.0.1","14.1.0.2-14.1.2","14.0.0.5-14.0.1","13.1.1.5-13.1.3","12.1.4.1-12.1.5","11.6.4-11.6.5","11.5.9-11.5.10");
vmatrix["WAM"]["unaffected"] = make_list("15.1.0","15.0.1.1","14.1.2.3","14.0.1.1","13.1.3.2","12.1.5.1","11.6.5.1");


if (bigip_is_affected(vmatrix:vmatrix, sol:sol))
{
  if (report_verbosity > 0) security_note(port:0, extra:bigip_report_get());
  else security_note(0);
  exit(0);
}
else
{
  tested = bigip_get_tested_modules();
  audit_extra = "For BIG-IP module(s) " + tested + ",";
  if (tested) audit(AUDIT_INST_VER_NOT_VULN, audit_extra, version);
  else audit(AUDIT_HOST_NOT, "running any of the affected modules");
}