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
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • 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 lets authenticated users gain root access. This article covers the technical details, affected versions, and mitigations.

Updated: May 16, 2026

CVE-2021-0223 Overview

CVE-2021-0223 is a local privilege escalation vulnerability in the telnetd.real binary shipped with Juniper Networks Junos OS. The binary is installed with setuid permissions and owned by root, which allows any locally authenticated shell user to execute it with root privileges. An attacker with low-privilege shell access can leverage this misconfiguration to escalate privileges and execute arbitrary commands as root. The flaw is classified under CWE-250 (Execution with Unnecessary Privileges) and CWE-269 (Improper Privilege Management). Juniper addressed the issue in the security advisory JSA11114.

Critical Impact

A locally authenticated shell user can execute arbitrary commands as root on Junos OS devices, gaining full control of affected network infrastructure.

Affected Products

  • Juniper Junos OS all versions prior to 15.1R7-S9
  • Juniper Junos OS 17.3, 17.4, 18.1, 18.2, 18.3, 18.4 (multiple sub-versions prior to fixed releases)
  • Juniper Junos OS 19.1, 19.2, 19.3, 19.4, 20.1, 20.2 (multiple sub-versions prior to fixed releases)

Discovery Timeline

  • 2021-01-15 - CVE-2021-0223 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-0223

Vulnerability Analysis

The vulnerability resides in the telnetd.real binary shipped with Junos OS. Juniper installs this binary with the setuid bit enabled and root ownership. When a low-privilege shell user invokes telnetd.real, the kernel elevates the effective user ID to root for the duration of execution. The daemon was not designed to be safely invoked by unprivileged users from a local shell context. An attacker can leverage this execution context to perform privileged operations or pivot to arbitrary command execution as root.

Root Cause

The root cause is a configuration and design flaw: telnetd.real should not require setuid root permissions to function in its intended network-launched role. Granting setuid root to a binary that is reachable from a user shell violates the principle of least privilege ([CWE-250]). Combined with improper privilege management ([CWE-269]), this allows any locally authenticated user to inherit root capabilities simply by executing the binary.

Attack Vector

Exploitation requires local shell access on the Junos OS device with valid authentication. Once an attacker has shell access, they invoke telnetd.real directly. Because the binary runs with effective UID 0, the attacker can manipulate the daemon's behavior to spawn a root shell or execute commands with root privileges. No user interaction beyond the initial shell access is required, and exploitation complexity is low.

No verified public proof-of-concept code is available for CVE-2021-0223.
Refer to Juniper Security Advisory JSA11114 for vendor-confirmed technical details.

Detection Methods for CVE-2021-0223

Indicators of Compromise

  • Unexpected invocations of /usr/sbin/telnetd.real or equivalent paths by non-root shell users in Junos OS audit logs
  • Shell sessions where the effective UID transitions from a non-zero user to root without an explicit su or sudo invocation
  • Creation of new privileged user accounts or modification of /etc/master.passwd shortly after a shell login

Detection Strategies

  • Audit setuid binaries on Junos OS file systems and flag any execution of telnetd.real by non-administrative users
  • Correlate shell login events with subsequent process executions running as root to identify privilege transitions
  • Monitor Junos OS syslog for UI_CMDLINE_READ_LINE and shell command events tied to telnet binary execution

Monitoring Recommendations

  • Forward Junos OS syslog and command accounting logs to a centralized SIEM for behavioral analysis
  • Establish a baseline of expected telnetd.real invocations and alert on deviations
  • Track all local shell user activity on Junos devices, especially commands executed within minutes of login

How to Mitigate CVE-2021-0223

Immediate Actions Required

  • Upgrade Junos OS to a fixed release listed in Juniper Security Advisory JSA11114
  • Restrict local shell access on Junos OS devices to a minimal set of trusted administrators
  • Review and rotate credentials for any account with local shell access on affected devices

Patch Information

Juniper Networks released patched versions across all affected release trains. Fixed versions include 15.1R7-S9, 17.3R3-S11, 17.4R2-S12, 17.4R3-S3, 18.1R3-S11, 18.2R3-S6, 18.3R2-S4, 18.3R3-S4, 18.4R2-S7, 18.4R3-S6, 19.1R2-S2, 19.1R3-S4, 19.2R1-S6, 19.2R3-S1, 19.3R3-S1, 19.4R2-S2, 19.4R3, 20.1R1-S4, 20.1R2, 20.2R2, and all subsequent releases. Refer to JSA11114 for the complete fixed-version matrix.

Workarounds

  • Limit shell access strictly to trusted administrators using Junos OS authentication classes and login configuration
  • Disable or remove the setuid bit on telnetd.real if operationally feasible and supported by your Juniper service contract
  • Enforce role-based access control and monitor command accounting to reduce the local attack surface
bash
# Example: restrict shell login class permissions in Junos OS
set system login class restricted-users permissions [ network view ]
set system login user operator class restricted-users
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-2023-36846: Juniper Junos Auth Bypass Vulnerability
Default Legacy - Prefooter | 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