REDHAT-BUG-2541638: Medium severity PHP Phar vulnerability

Published Sep 25, 2026
·
Updated

phartarnumber() parses the octal size field of a TAR header into a uint32t 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.

Affected Software

1 affected component
PHP Phar

Event History

Sep 25, 2026
Data Sourced
via Red Hat·08:41 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Who is exposed to this issue?

Applications that parse attacker-controlled TAR archives with PHP PharData are exposed. The crafted archive can cause PharData to report and extract injected entries as though they were legitimate.

2

What does an attacker need to exploit it?

An attacker needs to supply a specially crafted TAR archive containing an oversized octal size field. Exploitation occurs when PHP PharData parses that archive.

3

How can I tell whether an archive may be malicious?

A suspicious archive can declare a TAR entry size that exceeds 0xFFFFFFFF while using the 11-digit octal size field. This causes the parser to skip an incorrect number of data blocks and treat file content as subsequent TAR headers.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203