Skip to main content

CVE-2022-22220: CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition in Juniper Networks Junos OS

Medium
VulnerabilityCVE-2022-22220cvecve-2022-22220cwe-367
Published: Tue Oct 18 2022 (10/18/2022, 02:46:23 UTC)
Source: CVE
Vendor/Project: Juniper Networks
Product: Junos OS

Description

A Time-of-check Time-of-use (TOCTOU) Race Condition vulnerability in Routing Protocol Daemon (rpd) of Juniper Networks Junos OS, Junos OS Evolved allows a network-based unauthenticated attacker to cause a Denial of Service (DoS). When a BGP flow route with redirect IP extended community is received, and the reachability to the next-hop of the corresponding redirect IP is flapping, the rpd process might crash. Whether the crash occurs depends on the timing of the internally processing of these two events and is outside the attackers control. Please note that this issue also affects Route-Reflectors unless 'routing-options flow firewall-install-disable' is configured. This issue affects: Juniper Networks Junos OS: 18.4 versions prior to 18.4R2-S10, 18.4R3-S10; 19.1 versions prior to 19.1R3-S7; 19.2 versions prior to 19.2R1-S8, 19.2R3-S4; 19.4 versions prior to 19.4R3-S8; 20.2 versions prior to 20.2R3-S3; 20.3 versions prior to 20.3R3-S2; 20.4 versions prior to 20.4R3; 21.1 versions prior to 21.1R2. Juniper Networks Junos OS Evolved: All versions prior to 20.4R2-EVO; 21.1-EVO versions prior to 21.1R2-EVO. This issue does not affect Juniper Networks Junos OS versions prior to 18.4R1.

AI-Powered Analysis

AILast updated: 07/04/2025, 22:24:36 UTC

Technical Analysis

CVE-2022-22220 is a Time-of-check Time-of-use (TOCTOU) race condition vulnerability found in the Routing Protocol Daemon (rpd) component of Juniper Networks Junos OS and Junos OS Evolved. This vulnerability arises when the rpd process handles BGP flow routes containing redirect IP extended communities, specifically when the reachability status of the next-hop IP address associated with the redirect IP is unstable or flapping. Due to a race condition between the time the system checks the next-hop reachability and the time it uses that information, the rpd process may crash, resulting in a Denial of Service (DoS). The timing of the crash depends on internal event processing sequences and is not directly controllable by an attacker. This vulnerability affects multiple versions of Junos OS from 18.4 through 21.1 and all versions of Junos OS Evolved prior to 20.4R2-EVO and 21.1R2-EVO, except versions prior to 18.4R1 which are not affected. Route-Reflectors are also impacted unless the configuration option 'routing-options flow firewall-install-disable' is enabled, which mitigates the issue. The vulnerability is exploitable remotely without authentication, but requires a network attacker to send specially crafted BGP flow routes with redirect IP extended communities. The CVSS v3.1 base score is 5.9 (medium severity), reflecting a network attack vector with no privileges or user interaction required, but with high attack complexity and impact limited to availability (DoS). There are no known exploits in the wild as of the publication date, and no official patches are linked in the provided data, though Juniper has released fixed versions as indicated by the affected versions list. This vulnerability is classified under CWE-367 (TOCTOU Race Condition), a common concurrency flaw that can lead to inconsistent state and crashes in multi-threaded or event-driven systems like routing daemons.

Potential Impact

For European organizations, especially those operating critical network infrastructure such as ISPs, data centers, and large enterprises relying on Juniper Networks Junos OS for routing, this vulnerability poses a risk of network disruption due to potential rpd crashes. A successful exploitation could cause temporary loss of routing capabilities, leading to degraded network availability, service interruptions, and potential cascading effects on dependent services. Since the vulnerability can be triggered remotely without authentication, attackers could exploit it from outside the network, increasing the threat surface. The impact is primarily on availability, with no direct confidentiality or integrity compromise. However, network outages can indirectly affect business operations, regulatory compliance (e.g., GDPR mandates on service continuity), and customer trust. Organizations using Route-Reflectors without the recommended configuration are particularly at risk, as these are critical components in large BGP deployments. The medium CVSS score reflects moderate risk, but the real-world impact depends on network topology, redundancy, and incident response capabilities. Given the widespread use of Juniper devices in Europe, the potential for disruption is significant if unpatched systems remain in production.

Mitigation Recommendations

1. Immediate upgrade to fixed Junos OS versions as specified by Juniper Networks is the most effective mitigation. Organizations should consult Juniper's official advisories and apply patches for their specific Junos OS versions promptly. 2. For Route-Reflectors, enable the configuration option 'routing-options flow firewall-install-disable' to mitigate the vulnerability until patches can be applied. 3. Implement network segmentation and strict BGP session filtering to limit exposure to untrusted or external BGP peers, reducing the attack surface for malicious BGP flow route injections. 4. Monitor rpd process stability and set up alerting for crashes or restarts to enable rapid detection and response to exploitation attempts. 5. Conduct regular network device audits to identify Junos OS versions in use and prioritize patching for vulnerable devices. 6. Employ redundancy and failover mechanisms in routing infrastructure to minimize service disruption in case of rpd crashes. 7. Engage with Juniper support for guidance on best practices and any additional recommended configurations or patches. These steps go beyond generic advice by focusing on specific configuration changes, monitoring, and network design considerations relevant to this vulnerability.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
juniper
Date Reserved
2021-12-21T00:00:00.000Z
Cisa Enriched
true
Cvss Version
3.1
State
PUBLISHED

Threat ID: 682d9816c4522896dcbd6f0f

Added to database: 5/21/2025, 9:08:38 AM

Last enriched: 7/4/2025, 10:24:36 PM

Last updated: 8/16/2025, 1:09:11 PM

Views: 15

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats