CVE-2025-21590
None CISA KEVCVSS
—
EPSS
1.7%
Published
Mar 12, 2025
CISA due date
Apr 3, 2025
Cloudanix analysis
A person who already has powerful shell access to an affected Juniper device could tamper with its operating system, so vulnerable devices should be upgraded urgently.
- Exploitation
- Local Privilege
- Attacker needs
- High Privilege
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- OS kernel
- Class
- Privilege Escalation
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
This is a local privilege-escalation and integrity-compromise vulnerability in the Junos OS kernel caused by improper isolation or compartmentalization. An attacker who already has high-privilege local shell access, but not merely Junos CLI access, can inject arbitrary code into the affected device and undermine kernel-level integrity controls. Successful exploitation can allow unauthorized modification of device behavior, tampering with operating system components, concealment of activity, or preparation for persistence on a network infrastructure device.
Why it matters to the business
Compromise of a Juniper network device can affect routing, switching, firewalling, VPN, segmentation, and network availability depending on the device role. Because this vulnerability is listed in CISA KEV and has been observed as actively exploited in the wild, organizations should treat exposed affected versions as urgent even though exploitation requires prior high-privilege shell access. The CISA remediation due date was 2025-04-03, so any remaining vulnerable deployments are materially overdue and may represent a compliance and operational risk.
How an attack unfolds
An attacker first obtains high-privilege local shell access to an affected Junos OS device through another weakness, stolen credentials, misconfigured administrative access, or post-compromise lateral movement. The attacker then runs code from the shell context rather than the Junos CLI. By abusing the kernel isolation flaw, the attacker injects arbitrary code into the device environment and compromises the integrity of the operating system. After exploitation, the attacker may alter files, tamper with device behavior, disable or evade logging, stage additional tooling, maintain access, or manipulate network traffic handled by the device.
How to fix it
Upgrade Junos OS to a fixed release for the deployed branch. Fixed versions are: 21.2R3-S9 or later for all 21.2 and earlier affected releases; 21.4R3-S10 or later for 21.4; 22.2R3-S6 or later for 22.2; 22.4R3-S6 or later for 22.4; 23.2R2-S3 or later for 23.2; 23.4R2-S4 or later for 23.4; and 24.2R1-S2, 24.2R2, or later for 24.2. Restrict shell access to the smallest possible set of trusted administrators, disable or tightly control unnecessary local shell access, enforce MFA and strong authentication for management paths, limit management access to dedicated administrative networks, and review device hardening guidance. If compromise is suspected, do not rely only on an in-place upgrade; preserve evidence, rotate credentials and keys, review configuration integrity, and consider rebuilding or reimaging the device from trusted media.
How to confirm the fix worked
Confirm the running Junos OS version with standard administrative version checks and compare it against the fixed-version list for the installed release train. Verify that no devices remain on versions earlier than 21.2R3-S9, 21.4R3-S10, 22.2R3-S6, 22.4R3-S6, 23.2R2-S3, 23.4R2-S4, or 24.2R1-S2/24.2R2 as applicable. Validate that only authorized administrators can reach management services and obtain shell access. After upgrade, confirm the device rebooted into the expected image, configuration remains intact, and monitoring shows no unexpected local shell use, unknown files in writable directories, or unauthorized account/key changes.
Typical attack path
- Gain administrative or otherwise high-privilege access to the affected Junos OS device.
- Access the underlying shell; exploitation is not performed from the standard Junos CLI alone.
- Transfer, stage, or generate exploit code or helper binaries on the device, commonly in writable temporary locations.
- Execute the exploit from the shell to abuse the kernel isolation weakness.
- Inject arbitrary code and compromise device integrity.
- Modify system behavior, hide activity, establish persistence, or use the device as a foothold for further network activity.
How to detect it
There are no public, CVE-specific file names, commands, network signatures, or payload strings that uniquely identify exploitation. Detection should focus on signs of unauthorized high-privilege shell activity and post-exploitation changes on Junos OS devices. Review device logs such as system messages, authentication logs, accounting/command logs, and shell access records for unexpected logins, privilege changes, shell starts, file transfers, or commands executed outside approved maintenance windows. Investigate creation or execution of files in writable locations such as temporary directories, unexpected changes to user accounts, SSH authorized keys, startup scripts, system binaries, or configuration files. Compare device configuration and filesystem state against known-good backups. Correlate management-plane access logs with identity-provider, TACACS+/RADIUS, VPN, bastion, and jump-host logs to identify suspicious administrative sessions. Because this is a local shell-based issue, network IDS alone is unlikely to confirm exploitation; endpoint-style forensic review of the device and management access trail is more useful.
What your security team should do
- Immediately inventory Junos OS devices and prioritize remediation of any affected versions because the vulnerability is in CISA KEV and has active in-the-wild exploitation.
- Upgrade affected devices to the appropriate fixed Junos OS release for their branch, using maintenance windows that account for network redundancy and failover requirements.
- Review all recent shell access on Junos OS devices, especially activity by high-privilege users, service accounts, and unexpected source addresses.
- Restrict management-plane access to trusted administrative networks and enforce MFA, centralized authentication, and least privilege for device administrators.
- Rotate administrative passwords, SSH keys, API credentials, and automation credentials if unauthorized shell access or device integrity compromise is suspected.
- Check for unauthorized configuration changes, unexpected local users, modified startup scripts, suspicious files in temporary directories, and deviations from known-good device baselines.
- If exploitation is suspected, preserve logs and filesystem artifacts before reimaging or upgrading, and consider rebuilding from trusted images rather than relying solely on patching.
The record
An Improper Isolation or Compartmentalization vulnerability in the kernel of Juniper Networks Junos OS allows a local attacker with high privileges to compromise the integrity of the device. A local attacker with access to the shell is able to inject arbitrary code which can compromise an affected device. This issue is not exploitable from the Junos CLI. This issue affects Junos OS: * All versions before 21.2R3-S9, * 21.4 versions before 21.4R3-S10, * 22.2 versions before 22.2R3-S6, * 22.4 versions before 22.4R3-S6, * 23.2 versions before 23.2R2-S3, * 23.4 versions before 23.4R2-S4, * 24.2 versions before 24.2R1-S2, 24.2R2.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|