EulerOS Virtualization 2.9.1 : mozjs60 (EulerOS-SA-2022-1609) - Nessus

Critical   Plugin ID: 160606

This page contains detailed information about the EulerOS Virtualization 2.9.1 : mozjs60 (EulerOS-SA-2022-1609) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 160606
Name: EulerOS Virtualization 2.9.1 : mozjs60 (EulerOS-SA-2022-1609)
Filename: EulerOS_SA-2022-1609.nasl
Vulnerability Published: 2019-03-19
This Plugin Published: 2022-05-05
Last Modification Time: 2022-05-05
Plugin Version: 1.2
Plugin Type: local
Plugin Family: Huawei Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/cpu, Host/EulerOS/release, Host/EulerOS/rpm-list, Host/EulerOS/uvp_version, Host/local_checks_enabled

Vulnerability Information


Severity: Critical
Vulnerability Published: 2019-03-19
Patch Published: 2022-05-05
CVE [?]: CVE-2019-9791, CVE-2019-9795, CVE-2019-9810, CVE-2019-9813, CVE-2019-17017, CVE-2019-17026
CPE [?]: cpe:/o:huawei:euleros:uvp:2.9.1, p-cpe:/a:huawei:euleros:mozjs60

Synopsis

The remote EulerOS Virtualization host is missing multiple security updates.

Description

According to the versions of the mozjs60 package installed, the EulerOS Virtualization installation on the remote host is affected by the following vulnerabilities :

- Due to a missing case handling object types, a type confusion vulnerability could occur, resulting in a crash. We presume that with enough effort that it could be exploited to run arbitrary code. This vulnerability affects Firefox ESR < 68.4 and Firefox < 72. (CVE-2019-17017)

- Incorrect alias information in IonMonkey JIT compiler for setting array elements could lead to a type confusion. We are aware of targeted attacks in the wild abusing this flaw. This vulnerability affects Firefox ESR < 68.4.1, Thunderbird < 68.4.1, and Firefox < 72.0.1. (CVE-2019-17026)

- The type inference system allows the compilation of functions that can cause type confusions between arbitrary objects when compiled through the IonMonkey just-in-time (JIT) compiler and when the constructor function is entered through on-stack replacement (OSR). This allows for possible arbitrary reading and writing of objects during an exploitable crash. This vulnerability affects Thunderbird < 60.6, Firefox ESR < 60.6, and Firefox < 66. (CVE-2019-9791)

- A vulnerability where type-confusion in the IonMonkey just-in-time (JIT) compiler could potentially be used by malicious JavaScript to trigger a potentially exploitable crash. This vulnerability affects Thunderbird < 60.6, Firefox ESR < 60.6, and Firefox < 66. (CVE-2019-9795)

- Incorrect alias information in IonMonkey JIT compiler for Array.prototype.slice method may lead to missing bounds check and a buffer overflow. This vulnerability affects Firefox < 66.0.1, Firefox ESR < 60.6.1, and Thunderbird < 60.6.1. (CVE-2019-9810)

- Incorrect handling of __proto__ mutations may lead to type confusion in IonMonkey JIT code and can be leveraged for arbitrary memory read and write. This vulnerability affects Firefox < 66.0.1, Firefox ESR < 60.6.1, and Thunderbird < 60.6.1. (CVE-2019-9813)

Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.

Solution

Update the affected mozjs60 packages.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Exploit-DB, GitHub)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the EulerOS Virtualization 2.9.1 : mozjs60 (EulerOS-SA-2022-1609) vulnerability:

  1. Exploit-DB: exploits/multiple/dos/46613.js
    [EDB-46613: Spidermonkey - IonMonkey Type Inference is Incorrect for Constructors Entered via OSR]
  2. Exploit-DB: exploits/multiple/dos/46646.txt
    [EDB-46646: SpiderMonkey - IonMonkey Compiled Code Fails to Update Inferred Property Types (Type Confusion)]
  3. Exploit-DB: exploits/windows_x86-64/local/47752.js
    [EDB-47752: Mozilla FireFox (Windows 10 x64) - Full Chain Client Side Attack]
  4. Exploit-DB: exploits/windows_x86-64/local/49864.js
    [EDB-49864: Firefox 72 IonMonkey - JIT Type Confusion]
  5. Exploit-DB: exploits/windows/local/50691.txt
    [EDB-50691: Mozilla Firefox 67 - Array.pop JIT Type Confusion]
  6. GitHub: https://github.com/Sp0pielar/CVE-2019-9791
    [CVE-2019-9791: Exploit chain for CVE-2019-9791 & CVE-2019-11708 against firefox 65.0 on windows ...]
  7. GitHub: https://github.com/ZihanYe/web-browser-vulnerabilities
    [CVE-2019-9791]
  8. GitHub: https://github.com/googleprojectzero/fuzzilli
    [CVE-2019-9791]
  9. GitHub: https://github.com/tunz/js-vuln-db
    [CVE-2019-9791]
  10. GitHub: https://github.com/ulexec/Exploits
    [CVE-2019-9791]
  11. GitHub: https://github.com/0vercl0k/0vercl0k
    [CVE-2019-9810]
  12. GitHub: https://github.com/ZihanYe/web-browser-vulnerabilities
    [CVE-2019-9810]
  13. GitHub: https://github.com/a0viedo/demystifying-js-engines
    [CVE-2019-9810]
  14. GitHub: https://github.com/b0o/starred
    [CVE-2019-9810]
  15. GitHub: https://github.com/fengjixuchui/Just-pwn-it-for-fun
    [CVE-2019-9810]
  16. GitHub: https://github.com/lp008/Hack-readme
    [CVE-2019-9810]
  17. GitHub: https://github.com/m1ghtym0/browser-pwn
    [CVE-2019-9810]
  18. GitHub: https://github.com/mgaudet/SpiderMonkeyBibliography
    [CVE-2019-9810]
  19. GitHub: https://github.com/tunnelshade/cve-2019-11707
    [CVE-2019-9810]
  20. GitHub: https://github.com/ZihanYe/web-browser-vulnerabilities
    [CVE-2019-9813]
  21. GitHub: https://github.com/googleprojectzero/fuzzilli
    [CVE-2019-9813]
  22. GitHub: https://github.com/tunz/js-vuln-db
    [CVE-2019-9813]
  23. GitHub: https://github.com/HackOvert/awesome-bugs
    [CVE-2019-17026]
  24. GitHub: https://github.com/cloudrise/lansweeper-reports
    [CVE-2019-17026]
  25. GitHub: https://github.com/forrest-orr/DoubleStar
    [CVE-2019-17026]
  26. GitHub: https://github.com/lsw29475/CVE-2019-17026
    [CVE-2019-17026]
  27. GitHub: https://github.com/mgaudet/SpiderMonkeyBibliography
    [CVE-2019-17026]
  28. GitHub: https://github.com/v3nt4n1t0/DetectMozillaFirefoxVulnDomain.ps1
    [CVE-2019-17026]
  29. GitHub: https://github.com/offensive-security/exploitdb-bin-sploits/blob/master/bin-sploits/47752.zip
    [EDB-47752]
  30. GitHub: https://github.com/maxpl0it/CVE-2019-17026-Exploit
    [CVE-2019-17026: An exploit for CVE-2019-17026. It pops xcalc and was tested on Ubuntu (x64).]
  31. GitHub: https://github.com/0vercl0k/CVE-2019-11708
    [CVE-2019-9810: Full exploit chain (CVE-2019-11708 & CVE-2019-9810) against Firefox on Windows ...]
  32. GitHub: https://github.com/0vercl0k/CVE-2019-9810
    [CVE-2019-9810: Exploit for CVE-2019-9810 Firefox on Windows 64-bit.]
  33. GitHub: https://github.com/xuechiyaobai/CVE-2019-9810-PoC
    [CVE-2019-9810: Array.prototype.slice wrong alias information.]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS Score Source [?]: CVE-2019-9795
CVSS V2 Vector: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)
STIG Severity [?]: I
STIG Risk Rating: High

Go back to menu.

Plugin Source


This is the EulerOS_SA-2022-1609.nasl nessus plugin source code. This script is Copyright (C) 2022 and is owned by Tenable, Inc. or an Affiliate thereof.

##
# (C) Tenable, Inc.
##

include('compat.inc');

if (description)
{
  script_id(160606);
  script_version("1.2");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/05/05");

  script_cve_id(
    "CVE-2019-9791",
    "CVE-2019-9795",
    "CVE-2019-9810",
    "CVE-2019-9813",
    "CVE-2019-17017",
    "CVE-2019-17026"
  );
  script_xref(name:"IAVA", value:"2020-A-0002-S");
  script_xref(name:"IAVA", value:"2019-A-0089-S");
  script_xref(name:"CISA-KNOWN-EXPLOITED", value:"2022/05/03");

  script_name(english:"EulerOS Virtualization 2.9.1 : mozjs60 (EulerOS-SA-2022-1609)");

  script_set_attribute(attribute:"synopsis", value:
"The remote EulerOS Virtualization host is missing multiple security updates.");
  script_set_attribute(attribute:"description", value:
"According to the versions of the mozjs60 package installed, the EulerOS Virtualization installation on the remote host
is affected by the following vulnerabilities :

  - Due to a missing case handling object types, a type confusion vulnerability could occur, resulting in a
    crash. We presume that with enough effort that it could be exploited to run arbitrary code. This
    vulnerability affects Firefox ESR < 68.4 and Firefox < 72. (CVE-2019-17017)

  - Incorrect alias information in IonMonkey JIT compiler for setting array elements could lead to a type
    confusion. We are aware of targeted attacks in the wild abusing this flaw. This vulnerability affects
    Firefox ESR < 68.4.1, Thunderbird < 68.4.1, and Firefox < 72.0.1. (CVE-2019-17026)

  - The type inference system allows the compilation of functions that can cause type confusions between
    arbitrary objects when compiled through the IonMonkey just-in-time (JIT) compiler and when the constructor
    function is entered through on-stack replacement (OSR). This allows for possible arbitrary reading and
    writing of objects during an exploitable crash. This vulnerability affects Thunderbird < 60.6, Firefox ESR
    < 60.6, and Firefox < 66. (CVE-2019-9791)

  - A vulnerability where type-confusion in the IonMonkey just-in-time (JIT) compiler could potentially be
    used by malicious JavaScript to trigger a potentially exploitable crash. This vulnerability affects
    Thunderbird < 60.6, Firefox ESR < 60.6, and Firefox < 66. (CVE-2019-9795)

  - Incorrect alias information in IonMonkey JIT compiler for Array.prototype.slice method may lead to missing
    bounds check and a buffer overflow. This vulnerability affects Firefox < 66.0.1, Firefox ESR < 60.6.1, and
    Thunderbird < 60.6.1. (CVE-2019-9810)

  - Incorrect handling of __proto__ mutations may lead to type confusion in IonMonkey JIT code and can be
    leveraged for arbitrary memory read and write. This vulnerability affects Firefox < 66.0.1, Firefox ESR <
    60.6.1, and Thunderbird < 60.6.1. (CVE-2019-9813)

Note that Tenable Network Security has extracted the preceding description block directly from the EulerOS security
advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional
issues.");
  # https://developer.huaweicloud.com/ict/en/site-euleros/euleros/security-advisories/EulerOS-SA-2022-1609
  script_set_attribute(attribute:"see_also", value:"http://www.nessus.org/u?a3bd5fee");
  script_set_attribute(attribute:"solution", value:
"Update the affected mozjs60 packages.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:H/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:H/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2019-9795");

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

  script_set_attribute(attribute:"vuln_publication_date", value:"2019/03/19");
  script_set_attribute(attribute:"patch_publication_date", value:"2022/05/05");
  script_set_attribute(attribute:"plugin_publication_date", value:"2022/05/05");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:huawei:euleros:mozjs60");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:huawei:euleros:uvp:2.9.1");
  script_set_attribute(attribute:"stig_severity", value:"I");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Huawei Local Security Checks");

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

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/cpu", "Host/EulerOS/release", "Host/EulerOS/rpm-list", "Host/EulerOS/uvp_version");

  exit(0);
}

include("rpm.inc");

if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);

var release = get_kb_item("Host/EulerOS/release");
if (isnull(release) || release !~ "^EulerOS") audit(AUDIT_OS_NOT, "EulerOS");
var uvp = get_kb_item("Host/EulerOS/uvp_version");
if (uvp != "2.9.1") audit(AUDIT_OS_NOT, "EulerOS Virtualization 2.9.1");
if (!get_kb_item("Host/EulerOS/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);

var cpu = get_kb_item("Host/cpu");
if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$" && "aarch64" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "EulerOS", cpu);
if ("aarch64" >!< cpu) audit(AUDIT_ARCH_NOT, "aarch64", cpu);

var flag = 0;

var pkgs = [
  "mozjs60-60.2.2-4.h2.r1.eulerosv2r9"
];

foreach (var pkg in pkgs)
  if (rpm_check(release:"EulerOS-2.0", reference:pkg)) flag++;

if (flag)
{
  security_report_v4(
    port       : 0,
    severity   : SECURITY_HOLE,
    extra      : rpm_report_get()
  );
  exit(0);
}
else
{
  var tested = pkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, "mozjs60");
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/EulerOS_SA-2022-1609.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\EulerOS_SA-2022-1609.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/EulerOS_SA-2022-1609.nasl

Go back to menu.

How to Run


Here is how to run the EulerOS Virtualization 2.9.1 : mozjs60 (EulerOS-SA-2022-1609) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select Huawei Local Security Checks plugin family.
  6. On the right side table select EulerOS Virtualization 2.9.1 : mozjs60 (EulerOS-SA-2022-1609) plugin ID 160606.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl EulerOS_SA-2022-1609.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a EulerOS_SA-2022-1609.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - EulerOS_SA-2022-1609.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state EulerOS_SA-2022-1609.nasl -t <IP/HOST>

Go back to menu.

References


IAVA | Information Assurance Vulnerability Alert:
  • 2019-A-0089-S, 2020-A-0002-S
See also: Similar and related Nessus plugins:
  • 133413 - Debian DLA-2093-1 : firefox-esr security update
  • 133652 - Amazon Linux 2 : thunderbird (ALAS-2020-1393)
  • 134321 - NewStart CGSL CORE 5.04 / MAIN 5.04 : thunderbird Multiple Vulnerabilities (NS-SA-2020-0010)
  • 134325 - NewStart CGSL CORE 5.04 / MAIN 5.04 : firefox Multiple Vulnerabilities (NS-SA-2020-0011)
  • 134469 - GLSA-202003-02 : Mozilla Firefox: Multiple vulnerabilities
  • 135896 - Ubuntu 16.04 LTS : Thunderbird vulnerabilities (USN-4335-1)
  • 140283 - NewStart CGSL MAIN 4.05 : firefox Multiple Vulnerabilities (NS-SA-2020-0047)
  • 140291 - NewStart CGSL MAIN 4.05 : thunderbird Multiple Vulnerabilities (NS-SA-2020-0046)
  • 143948 - NewStart CGSL CORE 5.05 / MAIN 5.05 : firefox Multiple Vulnerabilities (NS-SA-2020-0097)
  • 143979 - NewStart CGSL CORE 5.05 / MAIN 5.05 : thunderbird Multiple Vulnerabilities (NS-SA-2020-0093)
  • 145595 - CentOS 8 : firefox (CESA-2019:0966)
  • 145921 - CentOS 8 : firefox (CESA-2020:0111)
  • 147312 - NewStart CGSL MAIN 4.06 : thunderbird Multiple Vulnerabilities (NS-SA-2021-0002)
  • 147407 - NewStart CGSL MAIN 4.06 : firefox Multiple Vulnerabilities (NS-SA-2021-0004)
  • 150661 - SUSE SLES11 Security Update : MozillaFirefox (SUSE-SU-2020:14268-1)
  • 159783 - EulerOS 2.0 SP9 : mozjs60 (EulerOS-SA-2022-1431)
  • 159810 - EulerOS 2.0 SP9 : mozjs60 (EulerOS-SA-2022-1452)
  • 160609 - EulerOS Virtualization 2.9.0 : mozjs60 (EulerOS-SA-2022-1632)

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file EulerOS_SA-2022-1609.nasl version 1.2. For more plugins, visit the Nessus Plugin Library.

Go back to menu.