In OpenSSH 7.9, scp.c in the scp client allows remote SSH servers to bypass intended access restrictions via the filename of . or an empty filename. The impact is modifying the permissions of the target directory on the client side.
This plugin only works with Tenable.ot. Please visit https://www.tenable.com/products/tenable-ot for more information.
#%NASL_MIN_LEVEL 80900
##
# (C) Tenable, Inc.
##
include('compat.inc');
if (description)
{
script_id(500840);
script_version("1.4");
script_set_attribute(attribute:"plugin_modification_date", value:"2023/12/12");
script_cve_id("CVE-2018-20685");
script_xref(name:"USN", value:"USN-3885-1");
script_xref(name:"DSA", value:"DSA-4387");
script_xref(name:"GLSA", value:"GLSA-201903-16");
script_xref(name:"GLSA", value:"GLSA-202007-53");
script_xref(name:"RHSA", value:"RHSA-2019:3702");
script_name(english:"Siemens SCALANCE X-200RNA Switch Devices Incorrect Authorization (CVE-2018-20685)");
script_set_attribute(attribute:"synopsis", value:
"The remote OT asset is affected by a vulnerability.");
script_set_attribute(attribute:"description", value:
"In OpenSSH 7.9, scp.c in the scp client allows remote SSH servers to bypass intended access restrictions via the
filename of . or an empty filename. The impact is modifying the permissions of the target directory on the client side.
- In OpenSSH 7.9, scp.c in the scp client allows remote SSH servers to bypass intended access restrictions
via the filename of . or an empty filename. The impact is modifying the permissions of the target
directory on the client side. (CVE-2018-20685)
This plugin only works with Tenable.ot. Please visit https://www.tenable.com/products/tenable-ot for more information.");
# https://github.com/openssh/openssh-portable/commit/6010c0303a422a9c5fa8860c061bf7105eb7f8b2
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?33d22ce5");
# https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/scp.c.diff?r1=1.197&r2=1.198&f=h
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?ecdd8632");
script_set_attribute(attribute:"see_also", value:"http://www.securityfocus.com/bid/106531");
script_set_attribute(attribute:"see_also", value:"https://sintonen.fi/advisories/scp-client-multiple-vulnerabilities.txt");
script_set_attribute(attribute:"see_also", value:"https://usn.ubuntu.com/3885-1/");
script_set_attribute(attribute:"see_also", value:"https://www.cisa.gov/news-events/ics-advisories/icsa-22-349-21");
script_set_attribute(attribute:"see_also", value:"https://www.debian.org/security/2019/dsa-4387");
script_set_attribute(attribute:"see_also", value:"https://security.netapp.com/advisory/ntap-20190215-0001/");
script_set_attribute(attribute:"see_also", value:"https://security.gentoo.org/glsa/201903-16");
script_set_attribute(attribute:"see_also", value:"https://lists.debian.org/debian-lts-announce/2019/03/msg00030.html");
# https://www.oracle.com/technetwork/security-advisory/cpuapr2019-5072813.html
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?9166970d");
# https://www.oracle.com/technetwork/security-advisory/cpuoct2019-5072832.html
script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?b370bc74");
script_set_attribute(attribute:"see_also", value:"https://access.redhat.com/errata/RHSA-2019:3702");
script_set_attribute(attribute:"see_also", value:"https://security.gentoo.org/glsa/202007-53");
script_set_attribute(attribute:"see_also", value:"https://cert-portal.siemens.com/productcert/pdf/ssa-412672.pdf");
script_set_attribute(attribute:"solution", value:
"The following text was originally created by the Cybersecurity and Infrastructure Security Agency (CISA). The original
can be found at CISA.gov.
Siemens released updates for the affected product and recommends updating to the latest version:
- Update to V3.2.7 or later version.
Siemens identified the following specific workarounds and mitigations customers can apply to reduce the risk:
- Restrict access to the affected systems, especially to ports 22/tcp and 443/tcp to trusted IP addresses only.
- Deactivate the webserver if not required, and if deactivation is supported by the product.
As a general security measure, Siemens recommends protecting network access to devices with appropriate mechanisms. In
order to operate the devices in a protected IT environment, Siemens recommends configuring the environment according to
Siemens' operational guidelines for industrial security and following the recommendations in the product manuals.
Siemens provides additional information on industrial security.
For further inquiries on security vulnerabilities in Siemens products and solutions, please contact Siemens.
For more information, see the associated Siemens security advisory SSA-412672 in HTML and CSAF.");
script_set_cvss_base_vector("CVSS2#AV:N/AC:H/Au:N/C:N/I:P/A:N");
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:R/S:U/C:N/I:H/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-2018-20685");
script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
script_set_attribute(attribute:"exploit_available", value:"false");
script_cwe_id(863);
script_set_attribute(attribute:"vuln_publication_date", value:"2019/01/10");
script_set_attribute(attribute:"patch_publication_date", value:"2019/01/10");
script_set_attribute(attribute:"plugin_publication_date", value:"2023/02/23");
script_set_attribute(attribute:"plugin_type", value:"remote");
script_set_attribute(attribute:"cpe", value:"cpe:/o:siemens:scalance_x204rna_eec_firmware");
script_set_attribute(attribute:"cpe", value:"cpe:/o:siemens:scalance_x204rna_firmware");
script_set_attribute(attribute:"generated_plugin", value:"current");
script_end_attributes();
script_category(ACT_GATHER_INFO);
script_family(english:"Tenable.ot");
script_copyright(english:"This script is Copyright (C) 2023 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("tenable_ot_api_integration.nasl");
script_require_keys("Tenable.ot/Siemens");
exit(0);
}
include('tenable_ot_cve_funcs.inc');
get_kb_item_or_exit('Tenable.ot/Siemens');
var asset = tenable_ot::assets::get(vendor:'Siemens');
var vuln_cpes = {
"cpe:/o:siemens:scalance_x204rna_firmware" :
{"versionEndExcluding" : "3.2.7", "family" : "SCALANCEX200"},
"cpe:/o:siemens:scalance_x204rna_eec_firmware" :
{"versionEndExcluding" : "3.2.7", "family" : "SCALANCEX200"}
};
tenable_ot::cve::compare_and_report(asset:asset, cpes:vuln_cpes, severity:SECURITY_NOTE);
Vendor | Product | Version | CPE |
---|---|---|---|
siemens | scalance_x204rna_eec_firmware | cpe:/o:siemens:scalance_x204rna_eec_firmware | |
siemens | scalance_x204rna_firmware | cpe:/o:siemens:scalance_x204rna_firmware |
cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-20685
www.nessus.org/u?33d22ce5
www.nessus.org/u?9166970d
www.nessus.org/u?b370bc74
www.nessus.org/u?ecdd8632
www.securityfocus.com/bid/106531
access.redhat.com/errata/RHSA-2019:3702
cert-portal.siemens.com/productcert/pdf/ssa-412672.pdf
lists.debian.org/debian-lts-announce/2019/03/msg00030.html
security.gentoo.org/glsa/201903-16
security.gentoo.org/glsa/202007-53
security.netapp.com/advisory/ntap-20190215-0001/
sintonen.fi/advisories/scp-client-multiple-vulnerabilities.txt
usn.ubuntu.com/3885-1/
www.cisa.gov/news-events/ics-advisories/icsa-22-349-21
www.debian.org/security/2019/dsa-4387