CVE-2025-21590 — Juniper Junos OS Improper Isolation or Compartmentalization Vulnerability

CVE-2025-21590

Juniper Junos OS — Shell-Access Privilege Boundary Bypass Enables Arbitrary Code Execution

What is Juniper Junos OS?

Juniper Networks Junos OS is the operating system powering Juniper's routing, switching, and network security platforms — including the MX Series routers, QFX/EX switches, and SRX Series firewalls. Junos OS is based on FreeBSD and runs on network devices that form the backbone of enterprise and service provider networks. These devices are high-value targets because compromising them provides persistent, deep visibility into network traffic and the ability to intercept or manipulate communications at scale.

Overview

Juniper Junos OS contains an improper isolation or compartmentalization vulnerability (CWE-653) that allows a local attacker with shell access (administrative privileges) to execute arbitrary code on the device. The vulnerability breaks the isolation boundary between the user environment and lower-level OS components, enabling privilege escalation to unrestricted code execution.

Juniper issued an out-of-cycle security bulletin on March 12, 2025 — indicating elevated urgency outside the normal patch cadence — and CISA added the vulnerability to the KEV catalog the following day, confirming active exploitation.

Affected Versions

Junos OS Version Fixed In
21.2 and earlier Consult Juniper Security Bulletin
21.4 Fixed in 21.4R3-S10 or later
22.2 Fixed in 22.2R3-S5 or later
22.4 Fixed in 22.4R3-S5 or later
23.2 Fixed in 23.2R2-S3 or later
23.4 Fixed in 23.4R2 or later
24.2+ Fixed

Consult the official Juniper Security Bulletin for the complete, authoritative list of affected and fixed versions.

Technical Details

Junos OS uses a layered architecture with separation between the routing daemon environment, the BSD-based control plane OS, and hardware forwarding planes. The CWE-653 classification (Insufficient Compartmentalization) indicates the vulnerability involves a failure to maintain isolation between privilege levels within this architecture.

An attacker with local shell access — meaning they can authenticate to the Junos OS management CLI and access a root shell — can exploit insufficient compartmentalization to inject and execute arbitrary code outside their authorized execution domain. This effectively escalates from administrative Junos CLI control to arbitrary code execution at a lower OS level, bypassing process isolation controls.

Attack characteristics:

  • Attack vector: Local — requires authenticated shell access to the device
  • High privileges required: Must already have administrative-level access (Junos shell/CLI)
  • No user interaction: Exploitation is direct once access is obtained
  • Impact: High integrity — arbitrary code execution; allows persistent implant installation, configuration tampering, or traffic interception

The out-of-cycle advisory timing suggests Juniper was aware of exploitation prior to disclosure, indicating the vulnerability may have been used in targeted attacks against network infrastructure.

Discovery

Juniper Networks credited the discovery in an out-of-cycle security bulletin published March 12, 2025. The accelerated disclosure timeline and immediate CISA KEV addition (March 13) are consistent with a report of active exploitation informing the disclosure decision.

Exploitation Context

CISA added CVE-2025-21590 to the KEV catalog on March 13, 2025 — one day after the out-of-cycle patch release — confirming in-the-wild exploitation. Juniper network infrastructure devices are high-priority targets for nation-state threat actors seeking persistent network access. Compromising a core router or firewall enables:

  • Traffic interception across all traffic routed through the device
  • Persistent implant installation surviving configuration resets if applied to base OS
  • Lateral movement across all network segments accessible from the device
  • Credential harvesting from management plane traffic

The KEV deadline of April 3, 2025 (21 days from patch release) reflects CISA's assessment of the exploitation risk.

Remediation

  1. Apply the patched Junos OS version — upgrade to the fixed version for your release branch per the Juniper Security Bulletin.
  2. Restrict shell access — limit who can access the Junos OS root shell; prefer operator-level CLI accounts over super-user accounts for day-to-day management.
  3. Audit authentication logs — review Junos authentication logs for unexpected shell access or unusual privilege escalation events prior to patch application.
  4. Out-of-band management — ensure Junos management interfaces (SSH, Netconf) are accessible only from dedicated out-of-band management networks, not from the data plane.
  5. Enable commit signing — use Junos commit auditing to detect unauthorized configuration changes that may indicate post-exploitation activity.
  6. Consider SIRT engagement — if exploitation is suspected before patching, contact Juniper's Security Incident Response Team (SIRT) for guidance on integrity verification.

Key Details

PropertyValue
CVE ID CVE-2025-21590
Vendor / Product Juniper — Junos OS
NVD Published2025-03-12
NVD Last Modified2025-10-24
CVSS 3.1 Score4.4
CVSS 3.1 VectorCVSS:3.1/AV:L/AC:L/PR:H/UI:N/S:U/C:N/I:H/A:N
SeverityMEDIUM
CWE CWE-653 find similar ↗
CISA KEV Added2025-03-13
CISA KEV Deadline2025-04-03
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Local
Attack Complexity
Low
Privileges Required
High
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Required Action

CISA BOD 22-01 Deadline: 2025-04-03. Apply mitigations per vendor instructions, follow applicable BOD 22-01 guidance for cloud services, or discontinue use of the product if mitigations are unavailable.

Timeline

DateEvent
2025-03-12Juniper releases out-of-cycle security bulletin and patch; CVE published
2025-03-13Added to CISA Known Exploited Vulnerabilities catalog (one day after patch)
2025-04-03CISA BOD 22-01 remediation deadline