CVE-2018-1000888
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.
What to do
Likely to be exploited: EPSS gives a 19% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Alpine, Debian, Packagist, Ubuntu: see the table below for the fixed version per release.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 18.04 | php-pear | Fixed | 1:1.10.5+submodules+notgz-1ubuntu1.18.04.1 | UBUNTU-CVE-2018-1000888 |
| Ubuntu 16.04 | php-pear | Fixed | 1:1.10.1+submodules+notgz-6ubuntu0.1 | UBUNTU-CVE-2018-1000888 |
| Debian 14 | php-pear | Fixed | 1:1.10.6+submodules+notgz-1.1 | DEBIAN-CVE-2018-1000888 |
| Debian 13 | php-pear | Fixed | 1:1.10.6+submodules+notgz-1.1 | DEBIAN-CVE-2018-1000888 |
| Debian 12 | php-pear | Fixed | 1:1.10.6+submodules+notgz-1.1 | DEBIAN-CVE-2018-1000888 |
| Red Hat Enterprise Linux 8 | php-pear | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | php-pear | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 6 | php-pear | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 5 | php-pear | Not affected | ||
| Alpine Linux 3.20 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.19 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.18 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.17 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.16 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.15 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.14 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.13 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.12 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.11 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.10 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.9 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Alpine Linux 3.8 | drupal7 | Fixed | 7.62-r0 | ALPINE-CVE-2018-1000888 |
| Packagist library | pear/archive_tar | Fixed | 1.4.4 | GHSA-3q76-jq6m-573p |
What the vendor says
As published in the CVE record by mitre, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
Vendor advisories:
- https://usn.ubuntu.com/3857-1/ (vendor-advisory)
- https://www.debian.org/security/2019/dsa-4378 (vendor-advisory)
- https://security.gentoo.org/glsa/202006-14 (vendor-advisory)
References
- https://lists.debian.org/debian-lts-announce/2019/02/msg00020.html
- https://usn.ubuntu.com/3857-1/
- https://www.debian.org/security/2019/dsa-4378
- https://www.exploit-db.com/exploits/46108/
- 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
- https://security.gentoo.org/glsa/202006-14
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.