CVE-2021-21706

published 4 Oct 2021 · updated 16 Sep 2024

ZipArchive::extractTo may extract outside of destination dir

5.3MediumCVSS 5.3EPSS 2%

No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 2%. Fixed in PHP 7.3.31, PHP 7.4.24 and PHP 8.0.11.

In PHP versions 7.3.x below 7.3.31, 7.4.x below 7.4.24 and 8.0.x below 8.0.11, in Microsoft Windows environment, ZipArchive::extractTo may be tricked into writing a file outside target directory when extracting a ZIP file, thus potentially causing files to be created or overwritten, subject to OS permissions.

Affected

Vendors, products and packages with version ranges

VendorProductVersionsFixed
PHP GroupPHP>=7.3.x <7.3.31, >=7.4.x <7.4.24, >=8.0.X <8.0.117.3.31, 7.4.24, 8.0.11

Timeline

Every event on this vulnerability

Related

Other vulnerabilities in PHP, strongest first

Embed

A live severity badge for an advisory, README or ticket

CVE-2021-21706 severity on Zeptric[![CVE-2021-21706](https://zeptric.io/badge/cve/CVE-2021-21706.svg)](https://zeptric.io/cve/CVE-2021-21706)