Skip to content
OpenAdvisories
High · 8.8 Public exploit CVE-2018-1000888 EUVD-2023-1941GHSA-3q76-jq6m-573p

Archive_Tar contains Potential RCE if filename starts with phar://

Published Dec 27, 2018 · Updated Aug 5, 2024 · Assigned by mitre

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.

ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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
ReleasePackageFixed inAdvisory
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)
ReleasePackageFixed inAdvisory
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

ReleasePackageFixed inAdvisory
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.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Exploit-DB 1

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
Packagist pear/archive_tar < 1.4.4 1.4.4 GHSA-3q76-jq6m-573p

Advisories 6

References