Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
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-21703

CVE-2021-21703: PHP FPM Privilege Escalation Vulnerability

CVE-2021-21703 is a privilege escalation vulnerability in PHP FPM that allows child worker processes to escalate privileges to root. This post covers the technical details, affected versions, security impact, and mitigation.

Published: February 25, 2026

CVE-2021-21703 Overview

CVE-2021-21703 is a local privilege escalation vulnerability affecting PHP-FPM (FastCGI Process Manager) that allows unprivileged users to escalate their privileges to root. The vulnerability exists in the shared memory mechanism between the main PHP-FPM daemon process (running as root) and child worker processes (running as lower-privileged users). By manipulating shared memory, an attacker with access to a child process can corrupt memory in a way that causes the root process to perform invalid memory reads and writes, ultimately leading to full root access.

Critical Impact

Local attackers with access to PHP-FPM child processes can escalate privileges from an unprivileged user to root, potentially gaining complete control over the affected system.

Affected Products

  • PHP versions 7.3.x up to and including 7.3.31
  • PHP versions 7.4.x below 7.4.25
  • PHP versions 8.0.x below 8.0.12
  • Debian Linux 9.0, 10.0, and 11.0
  • Fedora 33, 34, and 35
  • NetApp Clustered Data ONTAP
  • Oracle Communications Diameter Signaling Router

Discovery Timeline

  • 2021-10-25 - CVE-2021-21703 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2021-21703

Vulnerability Analysis

This vulnerability stems from improper access control (CWE-284) and out-of-bounds write conditions (CWE-787) in PHP-FPM's shared memory implementation. PHP-FPM uses a process-based architecture where the main daemon runs with root privileges to bind to privileged ports and manage worker processes, while child workers execute PHP code with reduced privileges for security isolation.

The core issue lies in the shared memory region used for inter-process communication between the root master process and the lower-privileged worker processes. The child processes have write access to memory segments that are also read by the root process. Due to insufficient validation of data written to shared memory, a malicious child process can craft memory modifications that corrupt the parent process's memory state.

When the root process subsequently reads this corrupted shared memory, it performs invalid memory operations. An attacker can leverage this behavior to achieve arbitrary code execution within the context of the root process, thereby escalating from a low-privileged user account to full root access on the system.

Root Cause

The root cause is insufficient isolation and validation in the shared memory communication channel between the privileged master PHP-FPM process and unprivileged worker processes. The architecture trusts data written by child processes without adequate boundary checks, creating an opportunity for memory corruption attacks. This design flaw allows a compromised or malicious child process to influence the execution flow of the parent root process through carefully crafted memory writes.

Attack Vector

This is a local privilege escalation attack requiring the attacker to first gain access to execute code within a PHP-FPM worker process. Common attack scenarios include:

  1. An attacker who has already compromised a web application running under PHP-FPM
  2. A malicious user on a shared hosting environment where PHP-FPM processes requests from multiple tenants
  3. An insider threat with limited shell access to a system running PHP-FPM

Once the attacker has code execution within a PHP-FPM child process, they can manipulate the shared memory region to trigger the vulnerability in the root master process. The attack requires high complexity due to the need to craft precise memory corruption patterns, but successful exploitation results in complete system compromise.

The vulnerability mechanism involves writing malicious data to the shared memory segment that will be subsequently processed by the master PHP-FPM process. When the master process performs memory operations based on this corrupted data, the attacker can hijack execution flow or overwrite critical memory structures to achieve root-level code execution.

Detection Methods for CVE-2021-21703

Indicators of Compromise

  • Unusual memory access patterns or crashes in PHP-FPM master processes
  • Unexpected process spawning from the PHP-FPM master process with elevated privileges
  • Suspicious modifications to shared memory segments associated with PHP-FPM
  • Anomalous behavior from PHP-FPM worker processes attempting to access unauthorized resources

Detection Strategies

  • Monitor PHP-FPM process behavior for unexpected memory operations or segmentation faults in the master process
  • Implement audit logging for PHP-FPM configuration changes and process events
  • Deploy endpoint detection solutions capable of identifying privilege escalation attempts from web server processes
  • Review system logs for signs of unauthorized root access following PHP-FPM process activity

Monitoring Recommendations

  • Enable detailed logging for PHP-FPM to capture process lifecycle events and errors
  • Configure system auditing (auditd) to monitor for privilege changes and suspicious process executions
  • Deploy file integrity monitoring on PHP binaries and configuration files
  • Utilize SentinelOne's behavioral AI to detect anomalous process behavior indicative of privilege escalation attempts

How to Mitigate CVE-2021-21703

Immediate Actions Required

  • Upgrade PHP to version 7.3.32 or later, 7.4.25 or later, or 8.0.12 or later immediately
  • Review PHP-FPM configurations and ensure the principle of least privilege is applied
  • Audit web applications for existing compromises that could be leveraged to exploit this vulnerability
  • Apply vendor-specific patches from Debian, Fedora, Oracle, and other affected distributions

Patch Information

PHP has released patched versions that address this vulnerability. Organizations should update to the following minimum versions:

  • PHP 7.3.x: Upgrade to 7.3.32 or later
  • PHP 7.4.x: Upgrade to 7.4.25 or later
  • PHP 8.0.x: Upgrade to 8.0.12 or later

Additional patch information is available from distribution vendors:

  • Debian Security Advisory DSA-4992
  • Debian Security Advisory DSA-4993
  • Fedora Package Announcements
  • Oracle CPU January 2022 Security Alerts
  • Oracle CPU April 2022 Security Alerts

For technical details on the vulnerability, refer to PHP Bug Report #81026 and the Openwall OSS Security Announcement.

Workarounds

  • Run PHP-FPM in a containerized environment with limited capabilities to reduce the impact of privilege escalation
  • Implement additional access controls and sandboxing around PHP-FPM processes where possible
  • Consider running PHP-FPM master process as a non-root user if the environment permits (though this may limit functionality)
  • Deploy network segmentation to limit lateral movement potential if the vulnerability is exploited
bash
# Check current PHP version and verify patched status
php -v

# For Debian/Ubuntu systems, update PHP packages
sudo apt update && sudo apt upgrade php-fpm

# For RHEL/CentOS/Fedora systems
sudo dnf update php-fpm

# Restart PHP-FPM service after patching
sudo systemctl restart php-fpm

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

  • Vulnerability Details
  • TypePrivilege Escalation

  • Vendor/TechPhp

  • SeverityHIGH

  • CVSS Score7.0

  • EPSS Probability0.13%

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

  • CWE-787
  • Technical References
  • Debian LTS Security Announcement

  • Fedora Package Announcement #1

  • Fedora Package Announcement #2

  • Fedora Package Announcement #3

  • Gentoo GLSA 202209-20

  • NetApp Security Advisory NTAP-20211118-0003

  • Debian Security Advisory DSA-4992

  • Debian Security Advisory DSA-4993
  • Vendor Resources
  • Openwall OSS Security Announcement

  • PHP Bug Report #81026

  • Oracle CPU April 2022 Security Alerts

  • Oracle CPU January 2022 Security Alerts
  • Related CVEs
  • CVE-2020-7063: PHP PHAR Privilege Escalation Vulnerability

  • CVE-2025-54017: Paid Member Subscriptions LFI Vulnerability

  • CVE-2025-46454: Meta Keywords & Description LFI Vulnerability

  • CVE-2026-29861: PHP-MYSQL User Login System SQLi Flaw
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