CVE-2020-7063
Files added to tar with Phar::buildFromIterator have all-access permissions
- Published
- Updated
- Reserved
- Assigned by
- php
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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| phpCNA (assigner) | 3.1 | Medium5.5 | CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N |
| NVDNVD · Modified | 3.1 | Medium5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N |
- EPSS (exploitation in 30 days)
- 1.6% · top 24% of all CVEs (6 Nov 2026)
The list uses the assigner's score when there is one, then CISA's, then NVD's: Medium 5.5.
Weakness
Affected products
What to do
Workaround: Use different Phar class functions to compose the archive, such as addFile(), or reset file permissions upon extracting files from the archive.
References (8)
- https://bugs.php.net/bug.php?id=79082 (opens in a new tab)x_refsource_MISCx_transferred
- openSUSE-SU-2020:0341 (opens in a new tab)vendor-advisoryx_refsource_SUSEx_transferred
- GLSA-202003-57 (opens in a new tab)vendor-advisoryx_refsource_GENTOOx_transferred
- [debian-lts-announce] 20200326 [SECURITY] [DLA 2160-1] php5 security update (opens in a new tab)mailing-listx_refsource_MLISTx_transferred
- USN-4330-1 (opens in a new tab)vendor-advisoryx_refsource_UBUNTUx_transferred
- DSA-4717 (opens in a new tab)vendor-advisoryx_refsource_DEBIANx_transferred
- DSA-4719 (opens in a new tab)vendor-advisoryx_refsource_DEBIANx_transferred
- https://www.tenable.com/security/tns-2021-14 (opens in a new tab)x_refsource_CONFIRMx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisories (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2020-7063)Record last updated .