Skip to main content
Vulnerability Database/CVE-2024-21596

CVE-2024-21596: Juniper Junos BGP DoS Vulnerability

CVE-2024-21596 is a heap-based buffer overflow DoS flaw in Juniper Junos BGP that crashes the backup Routing Engine via malicious UPDATE messages. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-21596 Overview

CVE-2024-21596 is a heap-based buffer overflow vulnerability in the Routing Protocol Daemon (rpd) of Juniper Networks Junos OS and Junos OS Evolved. An unauthenticated, network-based attacker with an established Border Gateway Protocol (BGP) session can trigger a memory overwrite by sending a crafted BGP UPDATE message. The result is an rpd crash and restart on the backup Routing Engine (RE), producing a sustained Denial of Service (DoS) when the attacker continues transmission. The primary RE and transit traffic are not impacted. Only devices with Non-Stop Routing (NSR) enabled are affected, and SRX Series devices are excluded because NSR is not supported on that platform. The weakness is tracked under CWE-122 and CWE-787.

Critical Impact

A single malformed BGP UPDATE from an established peer can repeatedly crash rpd on the backup Routing Engine, degrading high-availability guarantees on NSR-enabled routers.

Affected Products

  • Juniper Networks Junos OS: all versions prior to 20.4R3-S9, and multiple 21.x–23.2 trains prior to their listed fixed releases
  • Juniper Networks Junos OS Evolved: all versions prior to 21.3R3-S5-EVO, and multiple 21.x–23.2-EVO trains prior to their listed fixed releases
  • Devices with Non-Stop Routing (NSR) enabled running affected Junos builds (SRX Series excluded)

Discovery Timeline

  • 2024-01-12 - CVE-2024-21596 published to the National Vulnerability Database (NVD)
  • 2026-06-17 - Last updated in the NVD database

Technical Details for CVE-2024-21596

Vulnerability Analysis

The flaw resides in BGP UPDATE message handling within rpd, the daemon that implements Junos routing protocols. A specific BGP UPDATE triggers a heap-based buffer overflow, overwriting adjacent heap memory and corrupting daemon state. The corruption causes rpd to crash on the backup Routing Engine and the service subsequently restarts.

Because the attacker can resend the triggering message, each new session or synchronization attempt crashes rpd again. This produces a sustained DoS condition against the backup RE while leaving the primary RE and user traffic unaffected. The behavior still undermines the redundancy model of NSR, because the standby control plane cannot maintain state and the device loses its ability to perform a hitless failover.

Root Cause

The root cause is improper bounds validation in a BGP UPDATE parsing path. When attribute data in the UPDATE message is processed, the daemon writes past the end of a heap-allocated buffer. This classifies as a heap overflow ([CWE-122]) and an out-of-bounds write ([CWE-787]). The condition is only reachable where NSR is enabled, because NSR synchronizes BGP state to the backup RE, exposing the vulnerable parsing path on that engine.

Attack Vector

Exploitation requires an established BGP session with the target device. Both external BGP (eBGP) and internal BGP (iBGP) deployments are affected. The attacker, acting as a peer, sends a malformed BGP UPDATE. The message is accepted by the primary RE and replicated to the backup RE via the NSR state synchronization channel, where parsing triggers the overflow and crashes rpd. No authentication beyond standard BGP session establishment is required, and no user interaction is involved.

No public proof-of-concept exploit code has been published for CVE-2024-21596. For additional technical context, consult the Juniper Security Advisory JSA75735.

Detection Methods for CVE-2024-21596

Indicators of Compromise

  • Repeated rpd crash events and core files on the backup Routing Engine while the primary RE remains healthy
  • NSR synchronization failures or repeated backup RE re-initialization logged in /var/log/messages and /var/log/chassisd
  • Correlated BGP UPDATE bursts from a specific peer immediately preceding each rpd restart

Detection Strategies

  • Monitor Junos syslog for RPD_ crash signatures, rpd core dumps, and NSR state transitions on the backup RE
  • Alert on BGP peer flaps or protocol errors coinciding with backup RE rpd restarts, which can indicate a malformed UPDATE triggering the overflow
  • Perform BGP UPDATE message inspection at network ingress to flag malformed path attributes targeting NSR-enabled routers

Monitoring Recommendations

  • Ingest Junos routing and chassis logs into a centralized SIEM and build detections for recurring rpd restart cycles on the backup RE
  • Track BGP session statistics (OpenConfig or SNMP) per peer and alert on abnormal UPDATE rates or notification messages
  • Cross-correlate NSR health telemetry with upstream BGP peer behavior to identify a single peer repeatedly inducing failover state

How to Mitigate CVE-2024-21596

Immediate Actions Required

  • Upgrade Junos OS and Junos OS Evolved to a fixed release listed in Juniper Security Advisory JSA75735
  • Audit BGP peering sessions and remove or restrict any peers that are not strictly required
  • Enforce BGP authentication and route-policy filtering on all eBGP and iBGP sessions to reduce the exposed attack surface

Patch Information

Juniper has released fixed builds across the affected trains. For Junos OS, fixes are available in 20.4R3-S9, 21.2R3-S7, 21.3R3-S5, 21.4R3-S5, 22.1R3-S4, 22.2R3-S2, 22.3R3-S1, 22.4R2-S2, 22.4R3, 23.1R2, 23.2R1-S2, 23.2R2, and all later releases. For Junos OS Evolved, fixes are available in 21.3R3-S5-EVO, 21.4R3-S5-EVO, 22.1R3-S4-EVO, 22.2R3-S2-EVO, 22.4R2-S2-EVO, 22.4R3-EVO, 23.1R2-EVO, 23.2R1-S2-EVO, 23.2R2-EVO, and all later releases. Review the Juniper Security Advisory JSA75735 for the authoritative mapping of your deployed train to a fixed version.

Workarounds

  • Disable Non-Stop Routing (NSR) if operationally acceptable, since the vulnerability is only reachable when NSR is enabled
  • Restrict BGP peering to trusted, authenticated neighbors and apply strict inbound route-policy and prefix limits
  • Deploy infrastructure Access Control Lists (iACLs) that permit BGP (TCP/179) only from known peer addresses to the control plane
bash
# Configuration example - verify installed Junos version and NSR state
show version
show system commit
show task replication    # confirm NSR / RE replication status
show bgp summary

# Upgrade to a fixed release per JSA75735
request system software add /var/tmp/junos-install-<fixed-version>.tgz no-copy no-validate reboot

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.