The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2021-0223

CVE-2021-0223: Juniper Junos Privilege Escalation Flaw

CVE-2021-0223 is a local privilege escalation vulnerability in Juniper Junos OS telnetd.real that allows authenticated users to gain root access. This article covers technical details, affected versions, and mitigation steps.

Published: February 25, 2026

CVE-2021-0223 Overview

A local privilege escalation vulnerability exists in the telnetd.real component of Juniper Networks Junos OS. This security flaw allows a locally authenticated shell user to escalate privileges and execute arbitrary commands as root. The vulnerability stems from the telnetd.real binary being shipped with setuid permissions enabled and owned by the root user, which inadvertently allows local users to run the telnet daemon with elevated root privileges.

Critical Impact

Authenticated local attackers can leverage this setuid misconfiguration to gain complete root access on affected Juniper network devices, potentially compromising the entire network infrastructure.

Affected Products

  • Juniper Junos OS versions prior to 15.1R7-S9
  • Juniper Junos OS 17.3 versions prior to 17.3R3-S11
  • Juniper Junos OS 17.4 versions prior to 17.4R2-S12 and 17.4R3-S3
  • Juniper Junos OS 18.1 versions prior to 18.1R3-S11
  • Juniper Junos OS 18.2 versions prior to 18.2R3-S6
  • Juniper Junos OS 18.3 versions prior to 18.3R2-S4 and 18.3R3-S4
  • Juniper Junos OS 18.4 versions prior to 18.4R2-S7 and 18.4R3-S6
  • Juniper Junos OS 19.1 versions prior to 19.1R2-S2 and 19.1R3-S4
  • Juniper Junos OS 19.2 versions prior to 19.2R1-S6 and 19.2R3-S1
  • Juniper Junos OS 19.3 versions prior to 19.3R3-S1
  • Juniper Junos OS 19.4 versions prior to 19.4R2-S2 and 19.4R3
  • Juniper Junos OS 20.1 versions prior to 20.1R1-S4 and 20.1R2
  • Juniper Junos OS 20.2 versions prior to 20.2R2

Discovery Timeline

  • January 15, 2021 - CVE-2021-0223 published to NVD
  • November 21, 2024 - Last updated in NVD database

Technical Details for CVE-2021-0223

Vulnerability Analysis

This vulnerability represents a classic privilege escalation attack vector through improper setuid binary configuration (CWE-250: Execution with Unnecessary Privileges and CWE-269: Improper Privilege Management). The telnetd.real binary, which handles telnet daemon functionality on Junos OS, was inadvertently deployed with the setuid bit enabled and root ownership.

When a setuid binary is executed, it runs with the privileges of the file owner rather than the executing user. In this case, any locally authenticated user with shell access can invoke telnetd.real and have it execute with full root privileges. This architectural flaw bypasses the normal Unix privilege separation model that should restrict daemon operations to non-privileged contexts.

The attack requires local access and authentication, meaning an attacker must first gain shell access to the Juniper device. However, once authenticated, the path to root compromise is straightforward since the setuid binary can be abused to execute arbitrary commands in the root security context.

Root Cause

The root cause of this vulnerability is the improper configuration of file permissions on the telnetd.real binary. Specifically:

  1. The binary was configured with the setuid bit enabled (chmod u+s)
  2. The binary is owned by the root user
  3. This combination allows any user who can execute the binary to inherit root privileges

This represents a violation of the principle of least privilege. Telnet daemon operations do not require persistent root access, and the setuid permission should not have been applied to this binary. The misconfiguration likely originated during the build or packaging process of affected Junos OS versions.

Attack Vector

The attack vector is local, requiring an authenticated shell session on the vulnerable Juniper device. An attacker would exploit this vulnerability by executing the telnetd.real binary directly, leveraging its setuid root permissions to perform privileged operations.

The attack sequence typically involves:

  1. Gaining authenticated shell access to a Juniper device running a vulnerable Junos OS version
  2. Identifying the telnetd.real binary and confirming its setuid root configuration
  3. Executing the binary to obtain root-level command execution capabilities
  4. Using the elevated privileges to establish persistence, exfiltrate configuration data, or pivot to other network devices

Network infrastructure devices like Juniper routers and switches often serve as critical chokepoints in enterprise networks. Successful exploitation could allow attackers to intercept traffic, modify routing tables, disable security controls, or use the compromised device as a launching point for further attacks.

Detection Methods for CVE-2021-0223

Indicators of Compromise

  • Unexpected process executions of telnetd.real by non-root users in system logs
  • Anomalous shell activity from service accounts or restricted user accounts
  • New user accounts or modified user privileges on Juniper devices
  • Unauthorized configuration changes or routing table modifications
  • Evidence of credential harvesting or lateral movement originating from network devices

Detection Strategies

  • Monitor system logs for invocations of telnetd.real outside of normal telnet service operations
  • Implement file integrity monitoring to detect changes to critical system binaries and their permissions
  • Deploy behavioral analytics to identify privilege escalation patterns on network infrastructure devices
  • Use SIEM correlation rules to flag shell access followed by unexpected privileged operations

Monitoring Recommendations

  • Enable comprehensive logging on all Juniper devices and forward logs to a centralized SIEM platform
  • Implement network segmentation to limit which systems can establish management connections to network devices
  • Deploy SentinelOne Singularity for network device visibility and endpoint detection capabilities
  • Regularly audit user accounts and access privileges on all network infrastructure devices

How to Mitigate CVE-2021-0223

Immediate Actions Required

  • Upgrade affected Juniper Junos OS devices to patched versions as specified in the Juniper Security Advisory JSA11114
  • Audit all local user accounts on Juniper devices and remove unnecessary shell access privileges
  • Restrict physical and remote console access to authorized personnel only
  • Review and harden authentication mechanisms for network device management
  • Implement network access controls to limit management plane access to trusted subnets

Patch Information

Juniper Networks has released patched versions of Junos OS that address this vulnerability. Organizations should upgrade to the following minimum versions:

  • 15.1R7-S9 or later for the 15.1 release train
  • 17.3R3-S11 or later for the 17.3 release train
  • 17.4R2-S12, 17.4R3-S3, or later for the 17.4 release train
  • 18.1R3-S11 or later for the 18.1 release train
  • 18.2R3-S6 or later for the 18.2 release train
  • 18.3R2-S4, 18.3R3-S4, or later for the 18.3 release train
  • 18.4R2-S7, 18.4R3-S6, or later for the 18.4 release train
  • 19.1R2-S2, 19.1R3-S4, or later for the 19.1 release train
  • 19.2R1-S6, 19.2R3-S1, or later for the 19.2 release train
  • 19.3R3-S1 or later for the 19.3 release train
  • 19.4R2-S2, 19.4R3, or later for the 19.4 release train
  • 20.1R1-S4, 20.1R2, or later for the 20.1 release train
  • 20.2R2 or later for the 20.2 release train

For complete patch details and download links, refer to the Juniper Security Advisory JSA11114.

Workarounds

  • If immediate patching is not possible, manually remove the setuid bit from the telnetd.real binary using chmod u-s /path/to/telnetd.real (note: this may impact telnet service functionality)
  • Disable telnet service entirely and use SSH for all remote management access
  • Implement strict access controls to limit which users can obtain shell access on Juniper devices
  • Deploy jump hosts or bastion servers to mediate all management connections to network infrastructure
bash
# Verify telnetd.real permissions and identify setuid configuration
ls -la /usr/sbin/telnetd.real

# If setuid bit is set (shows 's' in permissions), remove it as a temporary mitigation
# WARNING: May impact telnet service functionality - test in non-production first
chmod u-s /usr/sbin/telnetd.real

# Disable telnet and enforce SSH-only management access
set system services telnet rate-limit 0
delete system services telnet
set system services ssh
commit

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechJuniper Junos

  • SeverityHIGH

  • CVSS Score7.8

  • EPSS Probability0.03%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-250

  • CWE-269
  • Vendor Resources
  • Juniper Security Advisory JSA11114
  • Related CVEs
  • CVE-2025-21590: Juniper Junos Privilege Escalation Flaw

  • CVE-2021-31385: Juniper Junos Privilege Escalation Flaw

  • CVE-2021-31372: Juniper Junos Privilege Escalation Flaw

  • CVE-2024-21586: Juniper Junos DoS Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English