Skip to content

CVE-2020-7063 Files added to tar with Phar::buildFromIterator have all-access permissions

MediumCVSS 5.3 EPSS 1.6%
Published
Updated
Exploit status
No public exploit known

Description

In PHP versions 7.2.x below 7.2.28, 7.3.x below 7.3.15 and 7.4.x below 7.4.3, when creating PHAR archive using PharData::buildFromIterator() function, the files are added with default permissions (0666, or all access) even if the original files on the filesystem were with more restrictive permissions. This may result in files having more lax permissions than intended when such archive is extracted.

Affected products

ProductAffected versionsFixed in
debian/php7.4(Debian:11) < 7.4.3-1 7.4.3-1
PHP >= 7.2.0, <= 7.2.27 No fix listed
PHP >= 7.3.0, <= 7.3.14 No fix listed
PHP >= 7.4.0, <= 7.4.2 No fix listed
tenable.sc < 5.19.0 5.19.0
debian linux = 8.0 No fix listed
debian linux = 9.0 No fix listed
debian linux = 10.0 No fix listed
openSUSE leap = 15.1 No fix listed
alpine/php7(Alpine:v3.11) < 7.3.15-r0 7.3.15-r0
alpine/php7(Alpine:v3.12) < 7.3.15-r0 7.3.15-r0
alpine/php7(Alpine:v3.13) < 7.3.15-r0 7.3.15-r0
alpine/php7(Alpine:v3.14) < 7.3.15-r0 7.3.15-r0
alpine/php7(Alpine:v3.15) < 7.3.15-r0 7.3.15-r0
alpine/php7(Alpine:v3.9) < 7.2.31-r0 7.2.31-r0
PHP >= 7.3.x, < 7.3.15 7.3.15
PHP >= 7.4.x, < 7.4.3 7.4.3
PHP >= 7.2.x, < 7.2.28 7.2.28

References