Product Affected

These issues affect Junos OS 15.1X49 through 19.3, 19.4, 20.1, 20.2, 20.3, 20.4, 21.1, 21.2, 21.3, 21.4. These issues affect Junos OS Evolved 21.3, 21.4.
High
7.5

Problem

Multiple vulnerabilities in SQLite as used in Juniper Networks Junos OS and Junos OS Evolved have been resolved by upgrading SQLite from 3.31.1 to 3.37.0.

Services that rely upon SQLite are the Connectivity Fault Management (CFM) Daemon (CFDM), AppID, IDP, Apache2, J-Web, and JSQL as used by IPID, SecIntel Threat Intelligence, useridd, accounts, processes and services.

These services are all exposed to potentially exploitable Denial of Service (DoS) attacks which may be exploited by a remote unauthenticated attacker sending packets to the device.

An attacker may be able to sustain the Denial of Service (DoS) condition by sending subsequent packets.

These issues affect:

Juniper Networks Junos OS

  • 15.1X49 version 15.1X49-D100 and all subsequent versions prior to 19.2R3-S5;
  • 19.3 versions prior to 19.3R3-S6;
  • 19.4 versions prior to 19.4R2-S6, 19.4R3-S8;
  • 20.1 versions prior to 20.1R3-S4;
  • 20.2 versions prior to 20.2R3-S4;
  • 20.3 versions prior to 20.3R3-S3;
  • 20.4 versions prior to 20.4R3-S3;
  • 21.1 versions prior to 21.1R3-S1;
  • 21.2 versions prior to 21.2R2-S2;
  • 21.3 versions prior to 21.3R2;
  • 21.4 versions prior to 21.4R1-S1, 21.4R2.

These issues are not applicable to versions prior to 15.1X49-D100.

Juniper Networks Junos OS Evolved

  • All versions prior to 21.2R3-EVO;
  • 21.3 versions prior to 21.3R3-EVO;
  • 21.4 versions prior to 21.4R2-EVO.

Juniper SIRT is not aware of any malicious exploitation of these vulnerabilities.

These issues were discovered during external security research.

Note: An assessment was completed as listed in the 3.37.1 vs 3.37.2 change log for the lang_upsert incorrect byte-code leading to NULL-pointer dereference and the FTS5 OOB read related to reading corrupt database file and Junos OS and Junos OS Evolved are not affected by these noted issues.

Note: CVE-2021-36690: This bug is not in the SQLite core library, but rather in an experimental extension that is used to implement the .expert command in the CLI. The code that contains the bug does not appear in standard SQLite builds, though it is included in the sqlite3.exe command-line tool. Applications must link against the extra source code files that implement the extension and take other deliberate actions to activate the extension before the troublesome code can be run. For the rare application that uses the troublesome extension, the consequence of this bug is that malicious SQL can cause a NULL pointer deference and denial of service.

Note: CVE-2020-11656: This issue requires compilation of SQLite with debug mode enabled. Juniper Networks does not enable SQLite debug mode.

Important security issues resolved include:

CVECVSSSummary
CVE-2021-366907.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)** DISPUTED ** A segmentation fault can occur in the sqlite3.exe command-line component of SQLite 3.36.0 via the idxGetTableInfo function when there is a crafted SQL query. NOTE: the vendor disputes the relevance of this report because a sqlite3.exe user already has full privileges (e.g., is intentionally allowed to execute commands). This report does NOT imply any problem in the SQLite library.
CVE-2021-202275.5 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)A flaw was found in SQLite's SELECT query functionality (src/select.c). This flaw allows an attacker who is capable of running SQL queries locally on the SQLite database to cause a denial of service or possible code execution by triggering a use-after-free. The highest threat from this vulnerability is to system availability.
CVE-2020-153585.5 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)In SQLite before 3.32.3, select.c mishandles query-flattener optimization, leading to a multiSelectOrderBy heap overflow because of misuse of transitive properties for constant propagation.
CVE-2020-138717.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)SQLite 3.32.2 has a use-after-free in resetAccumulator in select.c because the parse tree rewrite for window functions is too late.
CVE-2020-136325.5 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)ext/fts3/fts3_snippet.c in SQLite before 3.32.0 has a NULL pointer dereference via a crafted matchinfo() query.
CVE-2020-136315.5 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N)SQLite before 3.32.0 allows a virtual table to be renamed to the name of one of its shadow tables, related to alter.c and build.c.
CVE-2020-134355.5 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)SQLite through 3.32.0 has a segmentation fault in sqlite3ExprCodeTarget in expr.c.
CVE-2020-134345.5 (CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)SQLite through 3.32.0 has an integer overflow in sqlite3_str_vappendf in printf.c.
CVE-2020-116557.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)SQLite through 3.31.1 allows attackers to cause a denial of service (segmentation fault) via a malformed window-function query because the AggInfo object's initialization is mishandled.
CVE-2020-93277.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H)In SQLite 3.31.1, isAuxiliaryVtabOperator allows attackers to trigger a NULL pointer dereference and segmentation fault because of generated column optimizations.
CVE-2020-116566.2 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C/CR:H/IR:H/AR:H/MAV:L/MAC:H/MPR:N/MUI:N/MS:U/MC:L/MI:L/MA:H)In SQLite through 3.31.1, the ALTER TABLE implementation has a use-after-free, as demonstrated by an ORDER BY clause that belongs to a compound SELECT statement.
CVE-2020-136305.9 (AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H/E:P/RL:O/RC:C/CR:H/IR:H/AR:H/MAV:L/MAC:H/MPR:X/MUI:X/MS:X/MC:N/MI:N/MA:H)ext/fts3/fts3.c in SQLite before 3.32.0 has a use-after-free in fts3EvalNextRow, related to the snippet feature.

Solution

The following software releases have been updated to resolve these specific issues: 

Junos OS: 19.3R3-S6, 19.4R2-S6, 19.4R3-S8, 20.1R3-S4, 20.2R3-S4, 20.3R3-S3, 20.4R3-S3, 21.2R2-S2, 21.2R3, 21.3R2, 21.1R3-S1, 21.4R1-S1, 21.4R2, 22.1R1, and all subsequent releases.

Junos OS Evolved: 21.2R3-EVO, 21.3R3-EVO, 21.4R2-EVO, 22.1R1-EVO, and all subsequent releases.

Note: Juniper SIRT's policy is not to evaluate releases which are beyond End of Engineering (EOE) or End of Life (EOL).

These issues are being tracked as 1583420.

Implementation
Software Releases, patches and updates are available at https://support.juniper.net/support/downloads/.

Workaround

There are no viable workarounds for these issues.

Severity Assessment

7.5 (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H) Information for how Juniper Networks uses CVSS can be found at KB 16446 [juniper.net] "Common Vulnerability Scoring System (CVSS) and Juniper's Security Advisories.

Modification History

2022-07-13: Initial publication

Related Information