Plattform
php
Komponente
php
Behoben in
7.2.28
7.3.15
7.4.3
CVE-2020-7063 affects 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 vulnerability occurs when creating PHAR (PHP Archive) archives using the PharData::buildFromIterator() function. Files added to the archive are assigned default permissions (0666, or all access) even if the original files on the filesystem had more restrictive permissions. This can result in files having unintended access when the archive is extracted.
The primary impact of CVE-2020-7063 is the potential for unintended file access. When a PHAR archive created with the vulnerable function is extracted, files within the archive will be created with 0666 permissions, regardless of the original file permissions. This could allow users who should not have access to read or modify files that were originally protected. The severity is amplified in environments where PHAR archives are used to distribute applications or libraries, as this could expose sensitive data or allow unauthorized modifications to the application's code. While the CVSS score is medium, the potential for unintended access makes this a significant concern.
CVE-2020-7063 was published on 2020-02-27. It is not currently listed on KEV or EPSS, suggesting a low probability of active exploitation. Public Proof-of-Concept (PoC) code may exist, but there are no widespread reports of exploitation campaigns targeting this specific vulnerability. The vulnerability affects a range of PHP versions, making it a potentially widespread concern.
Systems utilizing 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 at risk. This includes web hosting environments, particularly shared hosting providers where multiple users may be creating and extracting PHAR archives. Applications that dynamically generate and distribute PHAR archives are also vulnerable.
• linux / server:
find /var/www/html -name '*.phar' -print0 | xargs -0 stat -c '%a %n' | grep '0666' • generic web:
curl -I <website_url>/path/to/archive.phar | grep 'Content-Type' # Check for application/zip or application/octet-streamdisclosure
Exploit-Status
EPSS
0.30% (54% Perzentil)
CVSS-Vektor
The recommended mitigation for CVE-2020-7063 is to upgrade to PHP version 7.4.3 or later. If upgrading is not immediately feasible, consider avoiding the use of PharData::buildFromIterator() and using alternative methods for creating PHAR archives that preserve file permissions. It is also possible to manually adjust the permissions of files after extracting the archive, but this is a less desirable solution. A WAF is unlikely to be effective in mitigating this vulnerability. After upgrading, verify the fix by creating a PHAR archive with files having specific permissions and confirming that the extracted files retain those permissions.
Actualice a la última versión de PHP. Específicamente, actualice a la versión 7.2.28 o superior, 7.3.15 o superior, o 7.4.3 o superior. Esto corregirá el problema de permisos al crear archivos PHAR con PharData::buildFromIterator().
Schwachstellenanalysen und kritische Warnungen direkt in deinen Posteingang.
CVE-2020-7063 is a vulnerability in PHP where PHAR archives created with PharData::buildFromIterator() assign default permissions (0666), potentially exposing files.
You are affected if you are using PHP versions 7.2.x below 7.2.28, 7.3.x below 7.3.15, or 7.4.x below 7.4.3.
Upgrade to PHP 7.4.3 or later to resolve this vulnerability. Consider temporary workarounds if immediate upgrade is not possible.
There are currently no known active exploitation campaigns targeting CVE-2020-7063, but the potential for abuse remains.
Refer to the official PHP security advisory: https://security.php.net/CVE-2020-7063
Lade deine Abhängigkeitsdatei hoch und erfahre sofort, ob dich diese und andere CVEs treffen.