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

CVE-2020-7068: PHP PHAR Use-After-Free Vulnerability

CVE-2020-7068 is a use-after-free vulnerability in PHP's PHAR extension that allows attackers to trigger crashes or information disclosure. This article covers the technical details, affected versions, and mitigation.

Published: March 11, 2026

CVE-2020-7068 Overview

CVE-2020-7068 is a Use After Free vulnerability affecting PHP versions 7.2.x below 7.2.33, 7.3.x below 7.3.21, and 7.4.x below 7.4.9. The vulnerability exists in the PHAR (PHP Archive) extension, specifically in the phar_parse_zipfile function. When processing maliciously crafted PHAR files, the function can be tricked into accessing freed memory, potentially leading to application crashes or information disclosure.

Critical Impact

A local attacker with low privileges could exploit this vulnerability to cause a denial of service condition through application crash or potentially extract sensitive information from memory.

Affected Products

  • PHP versions 7.2.x below 7.2.33
  • PHP versions 7.3.x below 7.3.21
  • PHP versions 7.4.x below 7.4.9
  • Debian Linux 10.0
  • Tenable.sc (various versions)

Discovery Timeline

  • 2020-09-09 - CVE-2020-7068 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2020-7068

Vulnerability Analysis

This Use After Free (CWE-416) vulnerability resides in PHP's PHAR extension, which handles PHP Archive files. The phar_parse_zipfile function contains a memory management flaw where it attempts to access memory that has already been deallocated during the parsing of ZIP-based PHAR archives.

Use After Free vulnerabilities occur when a program continues to use a pointer after the memory it references has been freed. In this case, the PHAR parser fails to properly track memory allocation states during archive processing, creating a window where freed memory can be referenced.

The attack requires local access with low privileges to execute, and the attack complexity is high, making successful exploitation more difficult. However, once exploited, an attacker could potentially read sensitive data from freed memory regions or cause the PHP process to crash.

Root Cause

The root cause of CVE-2020-7068 lies in improper memory lifecycle management within the phar_parse_zipfile function. When parsing ZIP-formatted PHAR archives, the function allocates memory for various archive structures. Under certain conditions involving malformed or specially crafted archive data, the memory deallocation logic can execute prematurely while references to that memory still exist in the parsing flow. Subsequent operations then attempt to access this freed memory, triggering the Use After Free condition.

Attack Vector

The attack vector for this vulnerability requires local access to the target system. An attacker would need to:

  1. Craft a malicious PHAR file designed to trigger the Use After Free condition
  2. Cause the target PHP application to process this malicious PHAR file through the phar extension
  3. The phar_parse_zipfile function would then access freed memory during archive parsing

The vulnerability mechanism involves manipulating the ZIP archive structure within a PHAR file to create a race condition or state inconsistency that leads to premature memory deallocation. When the parser continues processing and attempts to access the freed memory region, it may read arbitrary data or cause a segmentation fault.

For technical details on the vulnerability, see the PHP Bug Report #79797.

Detection Methods for CVE-2020-7068

Indicators of Compromise

  • Unexpected PHP process crashes or segmentation faults during PHAR file processing
  • Abnormal memory access patterns in PHP application logs
  • Presence of unusual or malformed PHAR/ZIP archive files in application directories
  • Error messages referencing phar_parse_zipfile in PHP error logs

Detection Strategies

  • Monitor PHP error logs for segmentation faults or memory-related errors during PHAR operations
  • Implement file integrity monitoring to detect suspicious PHAR files being uploaded or created
  • Deploy application-level monitoring to track PHAR extension usage patterns
  • Use SentinelOne's behavioral detection to identify anomalous PHP process behavior

Monitoring Recommendations

  • Enable verbose logging for PHP applications that process PHAR archives
  • Implement real-time monitoring of PHP process memory allocation patterns
  • Configure alerts for PHP process crashes that may indicate exploitation attempts
  • Monitor file upload endpoints for PHAR file submissions

How to Mitigate CVE-2020-7068

Immediate Actions Required

  • Upgrade PHP to version 7.2.33 or later for the 7.2.x branch
  • Upgrade PHP to version 7.3.21 or later for the 7.3.x branch
  • Upgrade PHP to version 7.4.9 or later for the 7.4.x branch
  • Review and restrict which applications have access to process PHAR files
  • Consider disabling the PHAR extension if not required for application functionality

Patch Information

PHP has released patches addressing this vulnerability in the following versions:

  • PHP 7.2.33 - Fixes the Use After Free in phar_parse_zipfile
  • PHP 7.3.21 - Fixes the Use After Free in phar_parse_zipfile
  • PHP 7.4.9 - Fixes the Use After Free in phar_parse_zipfile

Vendor advisories and patches are available from the following sources:

  • PHP Bug Report #79797
  • Debian Security Advisory DSA-4856
  • Tenable Security Advisory TNS-2021-14
  • Gentoo GLSA 202009-10

Workarounds

  • Disable the PHAR extension in php.ini if PHAR functionality is not required: phar.readonly = 1 and remove phar from enabled extensions
  • Implement strict input validation to prevent processing of untrusted PHAR files
  • Use application-level controls to restrict PHAR file processing to trusted sources only
  • Deploy web application firewalls (WAF) to filter requests containing PHAR content
bash
# Configuration example - Disable PHAR extension in php.ini
# Edit your php.ini file and add/modify the following:
phar.readonly = 1
# Comment out or remove the phar extension line if present:
# extension=phar
# Restart PHP/web server to apply changes
sudo systemctl restart php-fpm
sudo systemctl restart apache2  # or nginx

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

  • Vulnerability Details
  • TypeUse After Free

  • Vendor/TechPhp

  • SeverityLOW

  • CVSS Score3.6

  • EPSS Probability0.80%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:L
  • Impact Assessment
  • ConfidentialityHigh
  • IntegrityNone
  • AvailabilityLow
  • CWE References
  • CWE-416
  • Technical References
  • Gentoo GLSA 202009-10

  • NetApp Security Advisory NTAP-20200918-0005

  • Debian Security Advisory DSA-4856
  • Vendor Resources
  • PHP Bug Report #79797

  • Tenable Security Advisories TNS-2021-14
  • Related CVEs
  • CVE-2022-31627: PHP Use After Free Vulnerability

  • CVE-2021-21708: PHP Use-After-Free Vulnerability

  • CVE-2026-22427: GoTravel Path Traversal Vulnerability

  • CVE-2025-69409: PJ Coaching Theme Path Traversal 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