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-2020-7063

CVE-2020-7063: PHP PHAR Privilege Escalation Vulnerability

CVE-2020-7063 is a privilege escalation vulnerability in PHP affecting PHAR archive creation. Files created via PharData::buildFromIterator() receive excessive permissions. This article covers technical details, affected versions, impact, and mitigation strategies.

Published: March 4, 2026

CVE-2020-7063 Overview

CVE-2020-7063 is an Improper Permissions vulnerability affecting multiple versions of PHP. When creating PHAR (PHP Archive) files using the PharData::buildFromIterator() function, the archive fails to preserve the original file permissions from the source filesystem. Instead, all files are added with default permissions of 0666 (read/write for all users), regardless of the more restrictive permissions that may have been set on the original files. When such archives are extracted, the resulting files inherit these overly permissive settings, potentially exposing sensitive data or allowing unauthorized modifications.

Critical Impact

Files extracted from PHAR archives created with vulnerable PHP versions may have world-readable and world-writable permissions, potentially exposing sensitive configuration files, credentials, or allowing unauthorized file modifications.

Affected Products

  • PHP versions 7.2.x below 7.2.28
  • PHP versions 7.3.x below 7.3.15
  • PHP versions 7.4.x below 7.4.3
  • Tenable.sc (prior to patched versions)
  • Debian Linux 8.0, 9.0, and 10.0
  • openSUSE Leap 15.1

Discovery Timeline

  • 2020-02-27 - CVE-2020-7063 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-7063

Vulnerability Analysis

This vulnerability is classified under CWE-281 (Improper Preservation of Permissions). The core issue lies in how the PharData::buildFromIterator() function handles file metadata during archive creation. The function is designed to iterate over a collection of files and package them into a PHAR archive format, which is commonly used for distributing PHP applications and libraries.

When files are added to the archive, the function should capture and store the original permission bits from the source files. However, due to the flaw, the function instead applies a hardcoded default permission mask of 0666 to all files. This permission setting grants read and write access to the file owner, group, and all other users on the system.

The security implications become apparent during extraction. Applications that rely on PHAR archives to deploy configurations, scripts, or other sensitive files may inadvertently expose these files to unauthorized access. For instance, a configuration file containing database credentials that was originally set to 0600 (owner read/write only) would become world-readable after being packaged and extracted.

Root Cause

The root cause is a failure to properly preserve filesystem permission metadata when building PHAR archives using the PharData::buildFromIterator() method. The implementation does not read or store the source file's permission bits, defaulting instead to 0666 for all archived files. This represents an oversight in the archive creation logic where file attributes beyond content are not being properly captured and preserved.

Attack Vector

The attack vector for this vulnerability is network-based, as PHAR archives are commonly distributed via web applications, package managers, or file downloads. An attacker could exploit this vulnerability in several scenarios:

  1. Post-Extraction Privilege Abuse: After a legitimate archive created with vulnerable PHP versions is extracted, an attacker with local access could read or modify files that should have been protected by stricter permissions.

  2. Supply Chain Impact: If a developer creates and distributes PHAR archives using an affected PHP version, all downstream users who extract these archives will have improperly permissioned files on their systems.

  3. Sensitive Data Exposure: Configuration files, private keys, or credentials included in PHAR archives may become accessible to unauthorized local users after extraction.

The vulnerability affects the integrity aspect of the affected files, as the improper permissions could allow unauthorized modifications even without direct code execution.

Detection Methods for CVE-2020-7063

Indicators of Compromise

  • Files extracted from PHAR archives with unexpectedly permissive permissions (0666 or -rw-rw-rw-)
  • Configuration files or sensitive data with world-readable/writable permissions in web application directories
  • PHAR archives created with affected PHP versions present on the system

Detection Strategies

  • Audit PHP version across all systems to identify installations running versions 7.2.x below 7.2.28, 7.3.x below 7.3.15, or 7.4.x below 7.4.3
  • Implement file integrity monitoring to detect files with unexpected 0666 permissions in application directories
  • Review application logs for PharData::buildFromIterator() usage in archive creation workflows
  • Scan existing PHAR archives for permission metadata anomalies

Monitoring Recommendations

  • Monitor for changes in file permissions on sensitive configuration files and application directories
  • Implement alerts for new files created with world-writable permissions in web-accessible directories
  • Track PHP version updates across development and production environments
  • Audit PHAR archive creation and extraction activities in application workflows

How to Mitigate CVE-2020-7063

Immediate Actions Required

  • Upgrade PHP to version 7.2.28 or later for the 7.2.x branch
  • Upgrade PHP to version 7.3.15 or later for the 7.3.x branch
  • Upgrade PHP to version 7.4.3 or later for the 7.4.x branch
  • Review and correct permissions on files previously extracted from PHAR archives created with vulnerable versions
  • Apply vendor-specific patches from Debian, Ubuntu, openSUSE, and Tenable as applicable

Patch Information

Security patches addressing this vulnerability are available from multiple sources. The PHP project has released fixed versions for all affected branches. Refer to PHP Bug Report #79082 for official vendor information. Additional security advisories have been published by downstream vendors including Debian Security Advisory DSA-4717, Ubuntu Security Notice USN-4330-1, Gentoo GLSA 202003-57, and Tenable Security Notification TNS-2021-14.

Workarounds

  • Manually reset file permissions after extracting PHAR archives using chmod commands
  • Implement a post-extraction script to apply appropriate permissions based on file type and sensitivity
  • Avoid using PharData::buildFromIterator() until patched versions are deployed
  • Use alternative archive formats (ZIP, tar.gz) that properly preserve permissions until PHP can be upgraded
bash
# Remediation: Fix permissions on extracted files
# After extracting a PHAR archive, reset permissions appropriately
find /path/to/extracted/files -type f -exec chmod 0644 {} \;
find /path/to/extracted/files -type d -exec chmod 0755 {} \;

# For sensitive configuration files, apply stricter permissions
chmod 0600 /path/to/extracted/files/config/*.conf
chmod 0600 /path/to/extracted/files/.env

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

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.24%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-281
  • Technical References
  • openSUSE Security Announcement

  • Debian LTS Security Announcement

  • Gentoo GLSA 202003-57

  • Ubuntu Security Notice USN-4330-1

  • Debian Security Advisory DSA-4717

  • Debian Security Advisory DSA-4719
  • Vendor Resources
  • PHP Bug Report #79082

  • Tenable Security Notification TNS-2021-14
  • Related CVEs
  • CVE-2021-21703: PHP FPM 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