CVE-2026-6103: PHP Phar TAR integer overflow in size parsing

CVE-2026-6103 · Severity: medium · CVSS 4.3 · Published 2026-09-25

PHP's PharData class parses TAR archive headers using a function that stores large file sizes in a 32-bit integer without checking for overflow. An attacker can craft a malicious TAR archive with an oversized file entry that causes the parser to misalign and interpret attacker-controlled data as valid TAR headers. This allows injecting fake files into the archive that PharData will extract to disk, potentially placing malicious files in a user's vendor directories or other locations.

Technologies: Php. Vendors: PHP.

Quick answers

Is CVE-2026-6103 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-6103 being exploited in the wild.
How severe is CVE-2026-6103?
Medium severity, with a CVSS score of 4.3, published 25 September 2026.
Which products and versions are affected?
Php <8.2.34, <8.3.35, <8.4.26, <8.5.11.
Is there a fix for CVE-2026-6103?
A patch was published on 2026-09-25: PHP 8.2.34, 8.3.35, 8.4.26, 8.5.11 Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-6103 attacked?
It is attacked with local access, in a software library.
Am I affected by CVE-2026-6103?
Check whether you run Php at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The phar_tar_number() function parses 11-digit octal fields from TAR headers into a uint32_t without bounds checking, allowing values up to 0x1FFFFFFFF to wrap silently. When a size wraps to 0, the parser skips no data blocks and interprets the attacker's own file content as the next TAR header, enabling entry injection. The vulnerability affects all PharData operations including reading via phar:// stream and extractTo() extraction, and impacts package managers like Composer that unpack downloaded TAR archives.

Affected products

  • PHP PHP <8.2.34, <8.3.35, <8.4.26, <8.5.11

Timeline

  • 2026-09-25: disclosed
  • 2026-09-25: patched: PHP 8.2.34, 8.3.35, 8.4.26, 8.5.11

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.