phar_tar_number() parses the octal size field of a TAR header into a uint32_t with no overflow check. The field is 11 octal digits wide and holds values up to 0x1FFFFFFFF, so a size above 0xFFFFFFFF silently wraps. The parser then skips the wrong number of data blocks and interprets attacker-controlled file content as the next TAR header, which lets a crafted archive inject entries that PharData reports and extracts as if they were genuine.
Fix
Patch, vendor advisory and mitigation references on NVD 2
- https://github.com/php/php-src/security/advisories/GHSA-j3wh-g957-2m85 Vendor Advisory, Exploit
- https://github.com/php/php-src/security/advisories/GHSA-j3wh-g957-2m85 Vendor Advisory, Exploit
Every line above is quoted from NVD, CISA, Microsoft, the vendor's own advisory or DISA; nothing is generated.
Change history 1
- First seenCVSS 3.3 · phpNVD modified 2026-10-23 14:07
Affected (CPE criteria) 1
cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
References 2
- https://github.com/php/php-src/security/advisories/GHSA-j3wh-g957-2m85 Vendor Advisory, Exploit
- https://github.com/php/php-src/security/advisories/GHSA-j3wh-g957-2m85 Vendor Advisory, Exploit