CVE-2024-39524

7.8 HIGH

📋 TL;DR

This CVE describes a local privilege escalation vulnerability in Juniper Junos OS Evolved where authenticated low-privilege users can execute specific CLI commands with crafted parameters to gain root access. The vulnerability affects multiple Junos OS Evolved versions due to improper handling of command options. Attackers with local access can fully compromise affected systems.

💻 Affected Systems

Products:
  • Juniper Networks Junos OS Evolved
Versions: All versions before 20.4R3-S7-EVO, 21.2-EVO before 21.2R3-S8-EVO, 21.4-EVO before 21.4R3-S7-EVO, 22.2-EVO before 22.2R3-EVO, 22.3-EVO before 22.3R2-EVO, 22.4-EVO before 22.4R2-EVO
Operating Systems: Junos OS Evolved
Default Config Vulnerable: ⚠️ Yes
Notes: Requires local authenticated access with CLI command execution privileges

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Full system compromise with root access, allowing complete control over network devices, data exfiltration, and persistence establishment.

🟠

Likely Case

Privileged attackers gaining root access to manipulate network configurations, intercept traffic, or deploy additional malware.

🟢

If Mitigated

Limited impact if proper access controls restrict local user access and command execution capabilities.

🌐 Internet-Facing: LOW (requires local authenticated access, not remotely exploitable)
🏢 Internal Only: HIGH (local authenticated attackers can escalate to root)

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW (requires specific CLI commands with crafted parameters)

Exploitation requires authenticated access and knowledge of vulnerable commands

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 20.4R3-S7-EVO, 21.2R3-S8-EVO, 21.4R3-S7-EVO, 22.2R3-EVO, 22.3R2-EVO, 22.4R2-EVO or later

Vendor Advisory: https://supportportal.juniper.net/JSA82975

Restart Required: Yes

Instructions:

1. Download appropriate patched version from Juniper support portal. 2. Backup current configuration. 3. Install update following Juniper upgrade procedures. 4. Reboot device. 5. Verify version and functionality.

🔧 Temporary Workarounds

Restrict CLI command access

all

Limit which users can execute CLI commands through Junos OS role-based access control

set system login class restricted permissions [configured-permissions]

Monitor command execution

all

Enable auditing of CLI command execution to detect suspicious activity

set system syslog file commands any any
set system syslog file commands archive size 10m

🧯 If You Can't Patch

  • Implement strict access controls to limit local user access to CLI commands
  • Monitor for unusual privilege escalation attempts and command execution patterns

🔍 How to Verify

Check if Vulnerable:

Check Junos OS Evolved version with: show version | match Junos

Check Version:

show version | match Junos

Verify Fix Applied:

Verify version is patched: show version | match Junos and confirm version is 20.4R3-S7-EVO, 21.2R3-S8-EVO, 21.4R3-S7-EVO, 22.2R3-EVO, 22.3R2-EVO, 22.4R2-EVO or later

📡 Detection & Monitoring

Log Indicators:

  • Unusual CLI command execution patterns
  • Privilege escalation attempts
  • Root access from non-admin users

Network Indicators:

  • Configuration changes from unexpected sources
  • Unauthorized network modifications

SIEM Query:

source="junos" AND (event_type="command_execution" AND user!="admin") OR (privilege="root" AND user!="root")

🔗 References

📤 Share & Export