Hash: SHA256

             AUSCERT External Security Bulletin Redistribution

           2020-10 Security Bulletin: Junos OS: Multiple SQLite
                         vulnerabilities resolved.
                              16 October 2020


        AusCERT Security Bulletin Summary

Product:           Junos OS
Publisher:         Juniper Networks
Operating System:  Juniper
Impact/Access:     Execute Arbitrary Code/Commands -- Remote/Unauthenticated      
                   Denial of Service               -- Remote/Unauthenticated      
                   Cross-site Scripting            -- Remote with User Interaction
                   Access Confidential Data        -- Remote/Unauthenticated      
Resolution:        Patch/Upgrade
CVE Names:         CVE-2019-16168 CVE-2019-9937 CVE-2019-9936
                   CVE-2019-8457 CVE-2019-5018 CVE-2018-20506
                   CVE-2018-20505 CVE-2018-20346 CVE-2018-8740
                   CVE-2017-15286 CVE-2017-13685 CVE-2017-10989
                   CVE-2016-6153 CVE-2015-6607 CVE-2015-5895
                   CVE-2015-3717 CVE-2015-3416 CVE-2015-3415
                   CVE-2015-3414 CVE-2013-7443 CVE-2008-6593
                   CVE-2008-6592 CVE-2008-6590 CVE-2008-6589

Reference:         ESB-2020.2019

Original Bulletin: 

- --------------------------BEGIN INCLUDED TEXT--------------------

2020-10 Security Bulletin: Junos OS: Multiple SQLite vulnerabilities resolved.

Article ID: JSA11055
Last Updated: 14 Oct 2020
Version: 2.0

Product Affected:
This issue affects Junos OS 15.1X49, 17.2, 17.3, 17.4, 18.1, 18.2, 18.3, 18.4,
19.1, 19.2, 19.3, 19.4, 20.1.


Multiple vulnerabilities have been resolved in Juniper Networks Junos OS by
updating third party software included with Junos OS devices.

In Junos OS, the majority of attack vectors in this announcement require
multiple chaining attack events to be successful against services which do not
directly call SQLite. For the attacker to be able to access and successfully
execute commands on the device, only one attack vector is known to exist.

These issues potentially allow an attacker to execute code or commands thereby
allowing full access to the device.

These issues affects Juniper Networks Junos OS:

  o 15.1X49 versions prior to 15.1X49-D220;
  o 17.2 versions prior to 17.2R3-S4;
  o 17.3 versions prior to 17.3R3-S8;
  o 17.4 versions prior to 17.4R2-S11, 17.4R3-S2;
  o 18.1 versions prior to 18.1R3-S10;
  o 18.2 versions prior to 18.2R2-S7, 18.2R3-S5;
  o 18.3 versions prior to 18.3R2-S4, 18.3R3-S2;
  o 18.4 versions prior to 18.4R1-S7, 18.4R2-S5, 18.4R3-S3;
  o 19.1 versions prior to 19.1R1-S5, 19.1R2-S2, 19.1R3-S2;
  o 19.2 versions prior to 19.2R1-S5, 19.2R2;
  o 19.3 versions prior to 19.3R2-S3, 19.3R3;
  o 19.4 versions prior to 19.4R1-S3, 19.4R2-S1, 19.4R3;
  o 20.1 versions prior to 20.1R1-S2, 20.1R2.

These issues are not applicable to releases prior to 15.1X49.

Juniper SIRT is not aware of any malicious exploitation of these

Juniper SIRT is aware of publicly available SQLite exploits.

Important security issues resolved include:

     CVE           CVSS                           Summary
                            In SQLite through 3.29.0, whereLoopAddBtreeIndex in
               4.3 AV:N/    sqlite3.c can crash a browser or other application
CVE-2019-16168 AC:M/Au:N/   because of missing validation of a sqlite_stat1 sz
               C:N/I:N/A:P  field, aka a "severe division by zero in the query
               7.5 (        In SQLite 3.27.2, interleaving reads and writes in
               CVSS:3.0/    a single transaction with an fts5 virtual table
CVE-2019-9937  AV:N/AC:L/   will lead to a NULL Pointer Dereference in
               PR:N/UI:N/   fts5ChunkIterate in sqlite3.c. This is related to
               S:U/C:N/I:N/ ext/fts5/fts5_hash.c and ext/fts5/fts5_index.c.
               7.5 (        In SQLite 3.27.2, running fts5 prefix queries
               CVSS:3.0/    inside a transaction could trigger a heap-based
CVE-2019-9936  AV:N/AC:L/   buffer over-read in fts5HashEntrySort in sqlite3.c,
               PR:N/UI:N/   which may lead to an information leak. This is
               S:U/C:H/I:N/ related to ext/fts5/fts5_hash.c.
               7.5 AV:N/    SQLite3 from 3.6.0 to and including 3.27.2 is
CVE-2019-8457  AC:L/Au:N/   vulnerable to heap out-of-bound read in the
               C:P/I:P/A:P  rtreenode() function when handling invalid rtree
               8.1 (        An exploitable use after free vulnerability exists
               CVSS:3.0/    in the window function functionality of Sqlite3
               AV:N/AC:H/   3.26.0. A specially crafted SQL command can cause a
CVE-2019-5018  PR:N/UI:N/   use after free vulnerability, potentially resulting
               S:U/C:H/I:H/ in remote code execution. An attacker can send a
               A:H)         malicious SQL command to trigger this
                            SQLite before 3.25.3, when the FTS3 extension is
               8.1 (        enabled, encounters an integer overflow (and
               CVSS:3.0/    resultant buffer overflow) for FTS3 queries in a
               AV:N/AC:H/   "merge" operation that occurs after crafted changes
CVE-2018-20506 PR:N/UI:N/   to FTS3 shadow tables, allowing remote attackers to
               S:U/C:H/I:H/ execute arbitrary code by leveraging the ability to
               A:H)         run arbitrary SQL statements (such as in certain
                            WebSQL use cases). This is a different
                            vulnerability than CVE-2018-20346.
               7.5 (        SQLite 3.25.2, when queries are run on a table with
               CVSS:3.0/    a malformed PRIMARY KEY, allows remote attackers to
CVE-2018-20505 AV:N/AC:L/   cause a denial of service (application crash) by
               PR:N/UI:N/   leveraging the ability to run arbitrary SQL
               S:U/C:N/I:N/ statements (such as in certain WebSQL use cases).
                            SQLite before 3.25.3, when the FTS3 extension is
               8.1 (        enabled, encounters an integer overflow (and
               CVSS:3.0/    resultant buffer overflow) for FTS3 queries that
CVE-2018-20346 AV:N/AC:H/   occur after crafted changes to FTS3 shadow tables,
               PR:N/UI:N/   allowing remote attackers to execute arbitrary code
               S:U/C:H/I:H/ by leveraging the ability to run arbitrary SQL
               A:H)         statements (such as in certain WebSQL use cases),
                            aka Magellan.
               7.5 (
               CVSS:3.0/    In SQLite through 3.22.0, databases whose schema is
CVE-2018-8740  AV:N/AC:L/   corrupted using a CREATE TABLE AS statement could
               PR:N/UI:N/   cause a NULL pointer dereference, related to
               S:U/C:N/I:N/ build.c and prepare.c.
               7.5 (        SQLite 3.20.1 has a NULL pointer dereference in
               CVSS:3.0/    tableColumnList in shell.c because it fails to
CVE-2017-15286 AV:N/AC:L/   consider certain cases where `sqlite3_step(pStmt)==
               PR:N/UI:N/   SQLITE_ROW` is false and a data structure is never
               S:U/C:N/I:N/ initialized.
               5.5 (
               CVSS:3.0/    The dump_callback function in SQLite 3.20.0 allows
CVE-2017-13685 AV:L/AC:L/   remote attackers to cause a denial of service
               PR:N/UI:R/   (EXC_BAD_ACCESS and application crash) via a
               S:U/C:N/I:N/ crafted file.
               9.8 (        The getNodeSize function in ext/rtree/rtree.c in
               CVSS:3.0/    SQLite through 3.19.3, as used in GDAL and other
CVE-2017-10989 AV:N/AC:L/   products, mishandles undersized RTree blobs in a
               PR:N/UI:N/   crafted database, leading to a heap-based buffer
               S:U/C:H/I:H/ over-read or possibly unspecified other impact.
               5.9 (        os_unix.c in SQLite before 3.13.0 improperly
               CVSS:3.0/    implements the temporary directory search
               AV:L/AC:L/   algorithm, which might allow local users to obtain
CVE-2016-6153  PR:N/UI:N/   sensitive information, cause a denial of service
               S:U/C:L/I:L/ (application crash), or have unspecified other
               A:L)         impact by leveraging use of the current working
                            directory for temporary files.
               6.8 (AV:N/   SQLite before 3.8.9, as used in Android before
CVE-2015-6607  AC:M/Au:N/   5.1.1 LMY48T, allows attackers to gain privileges
               C:P/I:P/A:P) via a crafted application, aka internal bug
               10.0 (AV:N/  Multiple unspecified vulnerabilities in SQLite
CVE-2015-5895  AC:L/Au:N/   before, as used in Apple iOS before 9,
               C:C/I:C/A:C) have unknown impact and attack vectors.
                            Multiple buffer overflows in the printf
               7.5 (AV:N/   functionality in SQLite, as used in Apple iOS
CVE-2015-3717  AC:L/Au:N/   before 8.4 and OS X before 10.10.4, allow remote
               C:P/I:P/A:P) attackers to execute arbitrary code or cause a
                            denial of service (application crash) via
                            unspecified vectors.
                            The sqlite3VXPrintf function in printf.c in SQLite
                            before 3.8.9 does not properly handle precision and
               7.5 (AV:N/   width values during floating-point conversions,
CVE-2015-3416  AC:L/Au:N/   which allows context-dependent attackers to cause a
               C:P/I:P/A:P) denial of service (integer overflow and stack-based
                            buffer overflow) or possibly have unspecified other
                            impact via large integers in a crafted printf
                            function call in a SELECT statement.
                            The sqlite3VdbeExec function in vdbe.c in SQLite
                            before 3.8.9 does not properly implement comparison
               7.5 (AV:N/   operators, which allows context-dependent attackers
CVE-2015-3415  AC:L/Au:N/   to cause a denial of service (invalid free
               C:P/I:P/A:P) operation) or possibly have unspecified other
                            impact via a crafted CHECK clause, as demonstrated
                            by CHECK(0&O>O) in a CREATE TABLE statement.
                            SQLite before 3.8.9 does not properly implement the
                            dequoting of collation-sequence names, which allows
               7.5 (AV:N/   context-dependent attackers to cause a denial of
CVE-2015-3414  AC:L/Au:N/   service (uninitialized memory access and
               C:P/I:P/A:P) application crash) or possibly have unspecified
                            other impact via a crafted COLLATE clause, as
                            demonstrated by COLLATE"""""""" at the end of a
                            SELECT statement.
               5.0 (AV:N/   Buffer overflow in the skip-scan optimization in
CVE-2013-7443  AC:L/Au:N/   SQLite 3.8.2 allows remote attackers to cause a
               C:N/I:N/A:P) denial of service (crash) via crafted SQL
                            SQL injection vulnerability in LightNEasy/
               7.5 (AV:N/   lightneasy.php in LightNEasy SQLite 1.2.2 and
CVE-2008-6593  AC:L/Au:N/   earlier allows remote attackers to inject arbitrary
               C:P/I:P/A:P) PHP code into comments.dat via the dlid parameter
                            to index.php.
                            thumbsup.php in Thumbs-Up 1.12, as used in
                            LightNEasy "no database" (aka flat) and SQLite
               7.5 (AV:N/   1.2.2 and earlier, allows remote attackers to copy,
CVE-2008-6592  AC:L/Au:N/   rename, and read arbitrary files via directory
               C:P/I:P/A:P) traversal sequences in the image parameter with a
                            modified cache_dir parameter containing a %00
                            (encoded null byte).
                            Multiple directory traversal vulnerabilities in
               5.0 (AV:N/   LightNEasy "no database" (aka flat) version 1.2.2,
CVE-2008-6590  AC:L/Au:N/   and possibly SQLite version 1.2.2, allow remote
               C:P/I:N/A:N) attackers to read arbitrary files via a .. (dot
                            dot) in the page parameter to (1) index.php and (2)
                            Multiple cross-site scripting (XSS) vulnerabilities
               4.3 (AV:N/   in LightNEasy "no database" (aka flat) version
CVE-2008-6589  AC:M/Au:N/   1.2.2, and possibly SQLite version 1.2.2, allow
               C:N/I:P/A:N) remote attackers to inject arbitrary web script or
                            HTML via the page parameter to (1) index.php and
                            (2) LightNEasy.php.


The following software releases have been updated to resolve this specific
issue: 15.1X49-D220, 17.2R3-S4, 17.3R3-S8, 17.4R2-S11, 17.4R3-S2, 18.1R3-S10,
18.2R2-S7, 18.2R3-S5, 18.3R2-S4, 18.3R3-S2, 18.4R1-S7, 18.4R2-S5, 18.4R3-S3,
19.1R1-S5, 19.1R2-S2, 19.1R3-S2, 19.2R1-S5, 19.2R2, 19.3R2-S3, 19.3R3,
19.4R1-S3, 19.4R2-S1, 19.4R3, 20.1R1-S2, 20.1R2, 20.2R1, and all subsequent

This issue is being tracked as 1480208.


To reduce the risk of exploitation:

* Discontinue the use of SLAX scripts and the REST API.

* Monitor /var/chroot/rest-api/var/log for malicious activity.

* Allow access to the device from only trusted networks, administrators and
hosts and utilize jumpboxes.

Software releases or updates are available for download at https://
Modification History:
2020-10-14: Initial Publication.
CVSS Score:
7.8 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
Severity Level:
Severity Assessment:
Information for how Juniper Networks uses CVSS can be found at KB 16446 "Common
Vulnerability Scoring System (CVSS) and Juniper's Security Advisories."

- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

NOTE: Third Party Rights
This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content. The decision to follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the author's website to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:


Australian Computer Emergency Response Team
The University of Queensland
Qld 4072

Internet Email: auscert@auscert.org.au
Facsimile:      (07) 3365 7031
Telephone:      (07) 3365 4417 (International: +61 7 3365 4417)
                AusCERT personnel answer during Queensland business hours
                which are GMT+10:00 (AEST).
                On call after hours for member emergencies only.
Comment: http://www.auscert.org.au/render.html?it=1967