Lucene search

K
nessusThis script is Copyright (C) 2023 and is owned by Tenable, Inc. or an Affiliate thereof.TENABLE_OT_SIEMENS_CVE-2019-16905.NASL
HistoryMar 01, 2023 - 12:00 a.m.

Siemens SCALANCE X-200RNA Switch Devices Integer Overflow or Wraparound (CVE-2019-16905)

2023-03-0100:00:00
This script is Copyright (C) 2023 and is owned by Tenable, Inc. or an Affiliate thereof.
www.tenable.com
64
siemens scalance x-200rna
openssh
integer overflow
vulnerabilities
memory corruption
local code execution
xmss key parsing. scanner
tenable.ot

8.2 High

AI Score

Confidence

High

0.0005 Low

EPSS

Percentile

17.8%

OpenSSH 7.7 through 7.9 and 8.x before 8.1, when compiled with an experimental key type, has a pre-authentication integer overflow if a client or server is configured to use a crafted XMSS key. This leads to memory corruption and local code execution because of an error in the XMSS key parsing algorithm. NOTE: the XMSS implementation is considered experimental in all released OpenSSH versions, and there is no supported way to enable it when building portable OpenSSH.

  • OpenSSH 7.7 through 7.9 and 8.x before 8.1, when compiled with an experimental key type, has a pre- authentication integer overflow if a client or server is configured to use a crafted XMSS key. This leads to memory corruption and local code execution because of an error in the XMSS key parsing algorithm. NOTE:
    the XMSS implementation is considered experimental in all released OpenSSH versions, and there is no supported way to enable it when building portable OpenSSH. (CVE-2019-16905)

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(500847);
  script_version("1.4");
  script_set_attribute(attribute:"plugin_modification_date", value:"2023/12/12");

  script_cve_id("CVE-2019-16905");
  script_xref(name:"GLSA", value:"GLSA-201911-01");

  script_name(english:"Siemens SCALANCE X-200RNA Switch Devices Integer Overflow or Wraparound (CVE-2019-16905)");

  script_set_attribute(attribute:"synopsis", value:
"The remote OT asset is affected by a vulnerability.");
  script_set_attribute(attribute:"description", value:
"OpenSSH 7.7 through 7.9 and 8.x before 8.1, when compiled with an experimental key type, has a pre-authentication
integer overflow if a client or server is configured to use a crafted XMSS key. This leads to memory corruption and
local code execution because of an error in the XMSS key parsing algorithm. NOTE: the XMSS implementation is considered
experimental in all released OpenSSH versions, and there is no supported way to enable it when building portable
OpenSSH.

  - OpenSSH 7.7 through 7.9 and 8.x before 8.1, when compiled with an experimental key type, has a pre-
    authentication integer overflow if a client or server is configured to use a crafted XMSS key. This leads
    to memory corruption and local code execution because of an error in the XMSS key parsing algorithm. NOTE:
    the XMSS implementation is considered experimental in all released OpenSSH versions, and there is no
    supported way to enable it when building portable OpenSSH. (CVE-2019-16905)

This plugin only works with Tenable.ot. Please visit https://www.tenable.com/products/tenable-ot for more information.");
  # https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/sshkey-xmss.c.diff?r1=1.5&r2=1.6&f=h
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?db29788e");
  # https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/sshkey-xmss.c
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?956f9592");
  script_set_attribute(attribute:"see_also", value:"https://www.openwall.com/lists/oss-security/2019/10/09/1");
  script_set_attribute(attribute:"see_also", value:"https://www.openssh.com/releasenotes.html");
  script_set_attribute(attribute:"see_also", value:"https://bugzilla.suse.com/show_bug.cgi?id=1153537");
  script_set_attribute(attribute:"see_also", value:"https://0day.life/exploits/0day-1009.html");
  # https://ssd-disclosure.com/archives/4033/ssd-advisory-openssh-pre-auth-xmss-integer-overflow
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?3f7150cf");
  script_set_attribute(attribute:"see_also", value:"https://security.netapp.com/advisory/ntap-20191024-0003/");
  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://security.gentoo.org/glsa/201911-01");
  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:L/AC:M/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:POC/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:P/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-16905");

  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_cwe_id(190);

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/10/09");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/10/09");
  script_set_attribute(attribute:"plugin_publication_date", value:"2023/03/01");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:siemens:scalance_x204rna_ecc_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_ecc_firmware" :
        {"versionEndExcluding" : "3.2.7", "family" : "SCALANCEX200"}
};

tenable_ot::cve::compare_and_report(asset:asset, cpes:vuln_cpes, severity:SECURITY_WARNING);
VendorProductVersionCPE
siemensscalance_x204rna_firmwarecpe:/o:siemens:scalance_x204rna_firmware
siemensscalance_x204rna_ecc_firmwarecpe:/o:siemens:scalance_x204rna_ecc_firmware

8.2 High

AI Score

Confidence

High

0.0005 Low

EPSS

Percentile

17.8%