CVE-2026-7260
PHP vulnerability analysis and mitigation

Overview

CVE-2026-7260 is a stack overflow vulnerability in PHP's ext-phar extension caused by circular symbolic links in phar archives leading to unbounded recursion. The phar_get_link_source() function in ext/phar/util.c recursively follows symbolic links without any depth limit or cycle detection, allowing a crafted tar-based phar archive to exhaust the C stack and crash the PHP process. Affected versions include PHP 8.2.x before 8.2.33, 8.3.x before 8.3.33, 8.4.x before 8.4.24, and 8.5.x before 8.5.9. The vulnerability was published on July 30, 2026, and carries a CVSS v4.0 base score of 5.4 (Medium) and a CVSS v3.1 base score of 5.5 (Moderate) (GitHub Advisory, ENISA EUVD).

Technical details

The root cause is uncontrolled recursion (CWE-674) and uncontrolled resource consumption (CWE-400) in the phar_get_link_source() function located in ext/phar/util.c. The function recursively resolves symbolic link targets within phar manifests without implementing any cycle detection or recursion depth limit; when two or more entries form a circular symlink chain (e.g., file_a → file_b → file_a), the function recurses indefinitely until the C stack is exhausted, resulting in a segmentation fault. Exploitation requires a user or application to open a specially crafted tar-based phar archive and access a symlinked entry (e.g., via PharData::getContent()). A proof-of-concept using Python's tarfile module to construct the circular archive and a one-liner PHP script to trigger the crash is publicly documented in the official advisory (GitHub Advisory).

Impact

Successful exploitation causes the PHP process to crash (segmentation fault due to stack exhaustion), resulting in a denial of service. There is no confidentiality or integrity impact — the vulnerability exclusively affects availability of the PHP process and any dependent system components. In shared hosting or containerized environments where multiple applications share a PHP process pool, a crash could affect co-located services, though lateral movement or data exfiltration are not possible through this vulnerability alone (GitHub Advisory, ENISA EUVD).

Exploitation steps

  1. Craft the malicious phar archive: Use Python's tarfile module to create a tar-based phar archive (circular_symlinks.tar) containing two symlink entries that reference each other — file_a pointing to file_b and file_b pointing to file_a.
import tarfile
with tarfile.open('circular_symlinks.tar', 'w') as tar:
    a = tarfile.TarInfo(name='file_a'); a.type = tarfile.SYMTYPE; a.linkname = 'file_b'; tar.addfile(a)
    b = tarfile.TarInfo(name='file_b'); b.type = tarfile.SYMTYPE; b.linkname = 'file_a'; tar.addfile(b)
  1. Deliver the archive: Place the crafted circular_symlinks.tar in a location accessible to the target PHP application (e.g., via file upload, shared storage, or direct filesystem access).
  2. Trigger phar processing: Cause the vulnerable PHP application to open the archive and access a symlinked entry. This can be triggered directly with:
$p = new PharData("circular_symlinks.tar");
$p["file_a"]->getContent();
  1. Observe crash: The phar_get_link_source() function enters infinite recursion following the circular symlink chain, exhausting the C stack and causing a segmentation fault, crashing the PHP process (GitHub Advisory).

Indicators of compromise

  • Logs: PHP error logs or system logs showing segmentation fault (SIGSEGV) or stack overflow errors originating from the PHP process; web server logs (Apache/Nginx) recording 500 Internal Server Error responses coinciding with phar file access.
  • File System: Presence of unexpected .tar or .phar files in upload directories or temporary folders, particularly those with unusually small sizes but containing symlink entries; files named with patterns like circular_symlinks.tar.
  • Process: PHP-FPM or PHP CLI processes terminating abnormally with signal 11 (SIGSEGV); repeated PHP worker process restarts in PHP-FPM logs ([pool www] child ... exited on signal 11).
  • Network: Unusual file upload requests to web application endpoints that accept phar/tar archives, especially from unexpected source IPs (GitHub Advisory).

Mitigation and workarounds

Upgrade PHP to the patched versions: 8.2.33, 8.3.33, 8.4.24, or 8.5.9, which introduce cycle detection or depth limiting in phar_get_link_source(). No official configuration-based workaround has been published; as an interim measure, administrators should restrict untrusted user input from being processed as phar archives and disable phar processing for untrusted files where possible (e.g., via phar.readonly = On in php.ini if write access is not needed). Linux distribution packages (Fedora, RHEL, Debian, Slackware) have also begun shipping updated PHP packages addressing this CVE (GitHub Advisory, Linux Compatible).

Community reactions

The vulnerability was credited to Calvin Young of eWalker Consulting (HK) Limited and Enoch Chow of Isomorph Cyber, and was published as a Moderate severity advisory by the PHP security team on July 30, 2026. Security news outlets including CyberSecurityNews and CyberPress covered the broader PHP patch release addressing three flaws including this CVE. Remi Collet's PHP repository blog also noted the updated PHP versions. No significant controversy or unusual community reaction has been observed (GitHub Advisory, CyberSecurityNews, Remi's Blog).

Additional resources


SourceThis report was generated using AI

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-53599HIGH7.5
  • PHP logoPHP
  • redaxo/source
NoYesJul 31, 2026
CVE-2026-54768MEDIUM6.9
  • PHP logoPHP
  • wp-graphql/wp-graphql
NoNoJul 31, 2026
CVE-2026-55825LOW3.1
  • PHP logoPHP
  • composer://contao/core-bundle
NoYesJul 31, 2026
CVE-2026-57232LOW3.1
  • PHP logoPHP
  • composer://contao/contao
NoYesJul 31, 2026
CVE-2026-55824LOW2.6
  • PHP logoPHP
  • composer://contao/contao
NoYesJul 31, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management