GHSA-3q76-jq6m-573p

Suggest an improvement
Source
https://github.com/advisories/GHSA-3q76-jq6m-573p
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/07/GHSA-3q76-jq6m-573p/GHSA-3q76-jq6m-573p.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-3q76-jq6m-573p
Aliases
Published
2023-07-07T13:42:43Z
Modified
2024-02-17T05:29:19.960801Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H CVSS Calculator
Summary
Archive_Tar contains Potential RCE if filename starts with phar://
Details

PEAR ArchiveTar version 1.4.3 and earlier contains a CWE-502, CWE-915 vulnerability in the ArchiveTar class. There are several file operations with $v_header['filename'] as parameter (such as fileexists, isfile, isdir, 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 ArchiveTar 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.

References

Affected packages

Packagist / pear/archive_tar

Package

Name
pear/archive_tar
Purl
pkg:composer/pear/archive_tar

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.4.4

Affected versions

1.*

1.3.11
1.3.12
1.3.13
1.3.14
1.3.15
1.3.16
1.4.0
1.4.1
1.4.2
1.4.3