CVE-2022-22239

Junos OS Evolved: The ssh CLI command always runs as root which can lead to privilege escalation

Description

An Execution with Unnecessary Privileges vulnerability in Management Daemon (mgd) of Juniper Networks Junos OS Evolved allows a locally authenticated attacker with low privileges to escalate their privileges on the device and potentially remote systems. This vulnerability allows a locally authenticated attacker with access to the ssh operational command to escalate their privileges on the system to root, or if there is user interaction on the local device to potentially escalate privileges on a remote system to root. This issue affects Juniper Networks Junos OS Evolved: All versions prior to 20.4R3-S5-EVO; 21.1-EVO versions prior to 21.1R3-EVO; 21.2-EVO versions prior to 21.2R2-S1-EVO, 21.2R3-EVO; 21.3-EVO versions prior to 21.3R2-EVO. This issue does not affect Juniper Networks Junos OS.

Remediation

Solution:

  • The following software releases have been updated to resolve this specific issue: 20.4R3-S5-EVO, 21.1R3-EVO, 21.2R2-S1-EVO, 21.2R3-EVO, 21.3R2-EVO, 21.4R1-EVO, and all subsequent releases.

Workaround:

  • A workaround for this issue is to modify the applicable login class(es) so that the ssh command can not be accessed anymore. This can be done by removing the 'network' permission or modifying the resp. allow-/deny-commands configuration.

Categories

8.2
CVSS
Severity: High
CVSS 3.1 •
EPSS 0.04%
Vendor Advisory juniper.net
Affected: Juniper Networks Junos OS Evolved
Published at:
Updated at:

References

Link Tags
https://kb.juniper.net/JSA69895 vendor advisory

Frequently Asked Questions

What is the severity of CVE-2022-22239?
CVE-2022-22239 has been scored as a high severity vulnerability.
How to fix CVE-2022-22239?
To fix CVE-2022-22239: The following software releases have been updated to resolve this specific issue: 20.4R3-S5-EVO, 21.1R3-EVO, 21.2R2-S1-EVO, 21.2R3-EVO, 21.3R2-EVO, 21.4R1-EVO, and all subsequent releases.
Is CVE-2022-22239 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2022-22239 is being actively exploited. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2022-22239?
CVE-2022-22239 affects Juniper Networks Junos OS Evolved.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.