CVE-2026-6103

Phar TAR phar_tar_number() Integer Overflow - Archive Entry Injection

Published Sep 25, 2026 CVSS 3.1 · 4.3 Medium EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

The vulnerability lies in the phar_tar_number() function, which converts an 11‑digit octal size field from a TAR header into an unsigned 32‑bit value without checking for overflow. Because the field can represent values up to 0x1FFFFFFFF, a payload that exceeds 0xFFFFFFFF silently wraps around to a smaller size. This causes the parser to skip an incorrect amount of data and subsequently misinterpret attacker‑controlled content as the next TAR header, allowing an attacker to inject entries that the PharData library will report and extract as legitimate files.

Affected Systems

PHP installations that rely on the Phar extension to process TAR archives are impacted. No specific version range is provided, so all versions using the deprecated phar_tar_number() routine are potentially affected. Users should verify their PHP version and confirm whether the vulnerability exists in their current release.

Risk and Exploitability

The CVSS score of 4.3 indicates moderate severity. No EPSS data is available, and the vulnerability is not listed in the CISA KEV catalog, implying no confirmed exploit activity yet. The likely attack vector is delivery of a malicious PHAR/TAR file to an application that processes user‑supplied archives, which can be done locally or over a network if the application accepts remote uploads. An attacker who successfully exploits the overflow can force the deployment pipeline or file extraction logic to admit files that appear legitimate, potentially compromising data integrity or enabling subsequent exploits.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PHP to a release that addresses the integer overflow in phar_tar_number()
  • Avoid processing untrusted TAR or PHAR archives when possible
  • Validate the size field and check for overflow before parsing each archive entry

Generated by OpenCVE AI on September 25, 2026 at 21:48 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Debian DLA Debian DLA DLA-4819-1 php8.2 security update
Debian DSA Debian DSA DSA-6514-1 php8.4 security update
Ubuntu USN Ubuntu USN USN-8936-1 PHP vulnerabilities
History
Type Values Removed Values Added
First Time appeared Php
Php php
CPEs cpe:2.3:a:php:php:*:*:*:*:*:*:*:*
Vendors & Products Php
Php php
Type Values Removed Values Added
First Time appeared Php Group
Php Group php
Vendors & Products Php Group
Php Group php
Type Values Removed Values Added
First Time appeared Redhat
Redhat hummingbird
CPEs cpe:/a:redhat:hummingbird:1
Vendors & Products Redhat
Redhat hummingbird
References
Metrics threat_severity

None

threat_severity

Moderate

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description 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.
Title Phar TAR phar_tar_number() Integer Overflow - Archive Entry Injection
Weaknesses CWE-190
References
Metrics cvssV3_1

{'score': 4.3, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:C/C:N/I:L/A:N'}

Weaknesses
  • CWE-190

    Integer Overflow or Wraparound

Sources

Status
PUBLISHED
Assigner
php
Published
Updated
Sep 25, 2026, 8:41 PM
Reserved
Apr 11, 2026, 4:13 AM
Status
Analyzed
Published
Sep 25, 2026, 9:17 PM
Modified
Oct 23, 2026, 2:07 PM
Severity
Moderate
Public date
Sep 25, 2026, 8:08 PM