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

Published Jan 8, 2020
·
Updated

Fixed bug (Files added to tar with Phar::buildFromIterator have all-access permissions). (CVE-2020-7063)

Other sources

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 Software

21 affected componentsFixes available
redhat/rh-php73-php<0:7.3.20-1.el7
0:7.3.20-1.el7
PHP PHP<7.2.28
7.2.28
PHP PHP>=7.2.0<=7.2.27
PHP PHP>=7.3.0<=7.3.14
PHP PHP>=7.4.0<=7.4.2
Tenable Tenable.Sc<5.19.0
Debian Debian Linux=8.0
Debian Debian Linux=9.0
Debian Debian Linux=10.0
openSUSE Leap=15.1
alpine/php7<7.3.15-r0
7.3.15-r0
alpine/php7<7.3.15-r0
7.3.15-r0
alpine/php7<7.3.15-r0
7.3.15-r0
alpine/php7<7.3.15-r0
7.3.15-r0
alpine/php7<7.3.15-r0
7.3.15-r0
alpine/php7<7.2.31-r0
7.2.31-r0
debian/php7.4<7.4.3-1
7.4.3-1
debian/php5
5.6.40+dfsg-0+deb8u10
debian/php7.0
7.0.33-0+deb9u8
debian/php7.3
7.3.19-1~deb10u17.3.15-1
debian/php7.4
7.4.3-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/rh-php73-php to a version that resolves this vulnerability.

    Fixed in 0:7.3.20-1.el7
  2. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 7.2.28
  3. Upgrade

    Upgrade alpine/php7 to a version that resolves this vulnerability.

    Fixed in 7.3.15-r0
  4. Upgrade

    Upgrade alpine/php7 to a version that resolves this vulnerability.

    Fixed in 7.2.31-r0
  5. Upgrade

    Upgrade debian/php7.4 to a version that resolves this vulnerability.

    Fixed in 7.4.3-1
  6. Upgrade

    Upgrade debian/php5 to a version that resolves this vulnerability.

    Fixed in 5.6.40+dfsg-0+deb8u10
  7. Upgrade

    Upgrade debian/php7.0 to a version that resolves this vulnerability.

    Fixed in 7.0.33-0+deb9u8
  8. Upgrade

    Upgrade debian/php7.3 to a version that resolves this vulnerability.

    Fixed in 7.3.19-1~deb10u1Fixed in 7.3.15-1
  9. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 7.2.28
  10. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 7.3.15
  11. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 7.4.3

Event History

Jan 8, 2020
CVE Published
12:00 AM
Data Sourced
12:00 AM
RemedyDescriptionSeverityWeaknessAffected Software
Feb 17, 2020
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Feb 20, 2020
Data Sourced
via PHP·12:00 AM
DescriptionAffected Software
Updated
12:00 AM
Affected Software
Feb 27, 2020
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
via Ubuntu·12:00 AM
RemedyDescriptionAffected Software
Updated
via Ubuntu·12:00 AM
Description
CVE Published
via MITRE·08:25 PM
Data Sourced
via OSV·09:15 PM
DescriptionSeverityAffected Software
May 8, 2022
Data Sourced
via NVD·11:50 PM
RemedyDescriptionSeverityWeaknessAffected Software
Updated
11:50 PM
Affected Software
Dec 15, 2023
Data Sourced
via Red Hat·05:25 PM
DescriptionSeverityAffected Software
Nov 21, 2024
Updated
via NVD·05:36 AM
RemedyAffected Software
Jun 17, 2026
Updated
via NVD·03:24 AM
Affected Software
Nov 24, 2026
Withdrawn
via OSV·04:29 AM

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the vulnerability ID for this bug?

The vulnerability ID for this bug is CVE-2020-7063.

2

What is the severity level of CVE-2020-7063?

The severity level of CVE-2020-7063 is medium.

3

Which PHP versions are affected by CVE-2020-7063?

PHP versions 7.2.x below 7.2.28, 7.3.x below 7.3.15, and 7.4.x below 7.4.3 are affected by CVE-2020-7063.

4

How can I fix CVE-2020-7063?

To fix CVE-2020-7063, you should update your PHP version to 7.2.28, 7.3.15, or 7.4.3 or higher.

5

Are there any references for CVE-2020-7063?

Yes, you can find more information about CVE-2020-7063 at the following references: [1](https://bugs.php.net/bug.php?id=79082), [2](https://bugzilla.redhat.com/show_bug.cgi/show_bug.cgi?id=1808537), [3](http://git.php.net/?p=php-src.git;a=commit;h=e5c95234d87fcb8f6b7569a96a89d1e1544749a6).

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203