Vulnerability Name:

CVE-2021-31358 (CCN-211265)

Assigned:2021-10-13
Published:2021-10-13
Updated:2022-10-24
Summary:A command injection vulnerability in sftp command processing on Juniper Networks Junos OS Evolved allows an attacker with authenticated CLI access to be able to bypass configured access protections to execute arbitrary shell commands within the context of the current user. The vulnerability allows an attacker to bypass command authorization restrictions assigned to their specific user account and execute commands that are available to the privilege level for which the user is assigned. For example, a user that is in the super-user login class, but restricted to executing specific CLI commands could exploit the vulnerability to execute any other command available to an unrestricted admin user. This vulnerability does not increase the privilege level of the user, but rather bypasses any CLI command restrictions by allowing full access to the shell. This issue affects Juniper Networks Junos OS Evolved: All versions prior to 20.4R2-S2-EVO; 21.1 versions prior to 21.1R2-EVO; 21.2 versions prior to 21.2R1-S1-EVO, 21.2R2-EVO.
CVSS v3 Severity:7.8 High (CVSS v3.1 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
6.8 Medium (Temporal CVSS v3.1 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Local
Attack Complexity (AC): Low
Privileges Required (PR): Low
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): High
Availibility (A): High
7.8 High (CCN CVSS v3.1 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H)
6.8 Medium (CCN Temporal CVSS v3.1 Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H/E:U/RL:O/RC:C)
Exploitability Metrics:Attack Vector (AV): Local
Attack Complexity (AC): Low
Privileges Required (PR): Low
User Interaction (UI): None
Scope:Scope (S): Unchanged
Impact Metrics:Confidentiality (C): High
Integrity (I): High
Availibility (A): High
CVSS v2 Severity:7.2 High (CVSS v2 Vector: AV:L/AC:L/Au:N/C:C/I:C/A:C)
Exploitability Metrics:Access Vector (AV): Local
Access Complexity (AC): Low
Authentication (Au): None
Impact Metrics:Confidentiality (C): Complete
Integrity (I): Complete
Availibility (A): Complete
6.8 Medium (CCN CVSS v2 Vector: AV:L/AC:L/Au:S/C:C/I:C/A:C)
Exploitability Metrics:Access Vector (AV): Local
Access Complexity (AC): Low
Athentication (Au): Single_Instance
Impact Metrics:Confidentiality (C): Complete
Integrity (I): Complete
Availibility (A): Complete
Vulnerability Type:CWE-78
Vulnerability Consequences:Gain Access
References:Source: MITRE
Type: CNA
CVE-2021-31358

Source: XF
Type: UNKNOWN
juniper-cve202131358-cmd-exec(211265)

Source: CCN
Type: Juniper Networks Security Bulletin JSA11221
Junos OS Evolved: Multiple shell-injection vulnerabilities in EVO UI wrapper scripts

Source: CONFIRM
Type: Vendor Advisory
https://kb.juniper.net/JSA11221

Vulnerable Configuration:Configuration 1:
  • cpe:/o:juniper:junos_os_evolved:20.4:r1:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:21.1:r1:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:21.1:r2:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:21.1:r1-s1:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:21.2:r1:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:21.2:r1-s1:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:21.2:r2:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:21.1:-:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:20.4:r1-s1:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:20.4:r1-s2:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:20.4:r2:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:20.4:r2-s1:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:20.4:r2-s2:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:20.4:r2-s3:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:20.4:r3:*:*:*:*:*:*
  • OR cpe:/o:juniper:junos_os_evolved:*:*:*:*:*:*:*:* (Version <= 20.3)

  • Configuration CCN 1:
  • cpe:/o:juniper:junos_evolved:19.2:r1:*:*:*:*:*:*

  • * Denotes that component is vulnerable
    BACK
    juniper junos os evolved 20.4 r1
    juniper junos os evolved 21.1 r1
    juniper junos os evolved 21.1 r2
    juniper junos os evolved 21.1 r1-s1
    juniper junos os evolved 21.2 r1
    juniper junos os evolved 21.2 r1-s1
    juniper junos os evolved 21.2 r2
    juniper junos os evolved 21.1 -
    juniper junos os evolved 20.4 r1-s1
    juniper junos os evolved 20.4 r1-s2
    juniper junos os evolved 20.4 r2
    juniper junos os evolved 20.4 r2-s1
    juniper junos os evolved 20.4 r2-s2
    juniper junos os evolved 20.4 r2-s3
    juniper junos os evolved 20.4 r3
    juniper junos os evolved *
    juniper junos evolved 19.2 r1