Description
PEAR Archive_Tar version 1.4.3 and earlier contains a CWE-502, CWE-915 vulnerability in the Archive_Tar class. There are several file operations with `$v_header['filename']` as parameter (such as file_exists, is_file, is_dir, etc). When extract is called without a specific prefix path, we can trigger unserialization by crafting a tar file with `phar://[path_to_malicious_phar_file]` as path. Object injection can be used to trigger destruct in the loaded PHP classes, e.g. the Archive_Tar class itself. With Archive_Tar object injection, arbitrary file deletion can occur because `@unlink($this->_temp_tarname)` is called. If another class with useful gadget is loaded, it may possible to cause remote code execution that can result in files being deleted or possibly modified. This vulnerability appears to have been fixed in 1.4.4.
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | php-pear | 1:1.10.6+submodules+notgz-1.1 | — |
| Debian 13 | php-pear | 1:1.10.6+submodules+notgz-1.1 | — |
| Debian 12 | php-pear | 1:1.10.6+submodules+notgz-1.1 | — |
| Debian 9 | php-pear | 1:1.10.1+submodules+notgz-9+deb9u1 | DSA-4378-1 |
| Debian 8 | php5 | 5.6.39+dfsg-0+deb8u2 | DLA-1674-1 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 18.04 LTS | php-pear | 1:1.10.5+submodules+notgz-1ubuntu1.18.04.1 | USN-3857-1 |
| Ubuntu 16.04 LTS | php-pear | 1:1.10.1+submodules+notgz-6ubuntu0.1 | USN-3857-1 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | php7 | 7.4.24-1.1 | openSUSE-SU-2024:11167-1 |
| openSUSE Tumbleweed | php8 | 8.0.11-1.1 | openSUSE-SU-2024:11169-1 |
Alpine
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.20 | drupal7 | 7.62-r0 | — |
| Alpine v3.19 | drupal7 | 7.62-r0 | — |
| Alpine v3.18 | drupal7 | 7.62-r0 | — |
| Alpine v3.17 | drupal7 | 7.62-r0 | — |
| Alpine v3.16 | drupal7 | 7.62-r0 | — |
Show 8 more (older releases, extended support, other products)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine v3.15 | drupal7 | 7.62-r0 | — |
| Alpine v3.14 | drupal7 | 7.62-r0 | — |
| Alpine v3.13 | drupal7 | 7.62-r0 | — |
| Alpine v3.12 | drupal7 | 7.62-r0 | — |
| Alpine v3.11 | drupal7 | 7.62-r0 | — |
| Alpine v3.10 | drupal7 | 7.62-r0 | — |
| Alpine v3.9 | drupal7 | 7.62-r0 | — |
| Alpine v3.8 | drupal7 | 7.62-r0 | — |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Amazon Linux 2 | php-pear | 1:1.10.7-3.amzn2.0.1 | ALAS2-2019-1159 |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
Exploit-DB 1
- PEAR Archive_Tar < 1.4.4 - PHP Object Injection EDB-46108 · webapps · Jan 10, 2019
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Packagist | pear/archive_tar | < 1.4.4 | 1.4.4 | GHSA-3q76-jq6m-573p |
Advisories 6
- DSA-4378-1 php-pear - security update Debian Security (DSA / DLA) · Mar 9, 2026
- DLA-1674-1 php5 - security update Debian Security (DSA / DLA) · Mar 9, 2026
- USN-3857-1 php-pear vulnerability Ubuntu Security Notices (USN) · Feb 10, 2026
- openSUSE-SU-2024:11167-1 php7-7.4.24-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- openSUSE-SU-2024:11169-1 php8-8.0.11-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026
- ALAS2-2019-1159 Moderate: php-pear security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Feb 14, 2019
References
- [debian-lts-announce] 20190212 [SECURITY] [DLA 1674-1] php5 security update mailing-list
- USN-3857-1 vendor-advisory
- DSA-4378 vendor-advisory
- 46108 exploit
- https://pear.php.net/package/Archive_Tar/download/
- https://cdn2.hubspot.net/hubfs/3853213/us-18-Thomas-It%27s-A-PHP-Unserialization-Vulnerability-Jim-But-Not-As-We-....pdf
- https://blog.ripstech.com/2018/new-php-exploitation-technique/
- https://pear.php.net/bugs/bug.php?id=23782
- GLSA-202006-14 vendor-advisory