Learn about CVE-2020-7063 affecting PHP versions 7.2.x, 7.3.x, and 7.4.x. Understand the security risk of files in PHAR archives having all-access permissions.
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 a vulnerability where files added to a tar archive using Phar::buildFromIterator have all-access permissions, potentially leading to unintended lax file permissions upon extraction.
Understanding CVE-2020-7063
This CVE involves a security issue in PHP versions that can result in files having broader permissions than intended when included in a PHAR archive.
What is CVE-2020-7063?
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, the PharData::buildFromIterator() function adds files to a PHAR archive with default permissions, potentially causing security risks.
The Impact of CVE-2020-7063
Technical Details of CVE-2020-7063
This section provides more in-depth technical insights into the vulnerability.
Vulnerability Description
When creating a PHAR archive using PharData::buildFromIterator(), files are added with default permissions, potentially leading to lax file permissions upon extraction.
Affected Systems and Versions
Exploitation Mechanism
The issue arises when the PharData::buildFromIterator() function is used to create PHAR archives, resulting in files with broader permissions than intended.
Mitigation and Prevention
To address CVE-2020-7063, follow these mitigation strategies:
Immediate Steps to Take
Long-Term Security Practices
Patching and Updates
Stay updated with security patches released by PHP to address this vulnerability.