First published: Mon Oct 04 2021(Updated: )
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.
Credit: security@php.net
Affected Software | Affected Version | How to fix |
---|---|---|
PHP PHP | >=7.3.0<7.3.31 | |
PHP PHP | >=7.4.0<7.4.24 | |
PHP PHP | >=8.0.0<8.0.11 | |
Microsoft Windows | ||
<8.1.0 | 8.1.0 |
Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.
The vulnerability ID of this bug is CVE-2021-21706.
The title of this bug is Fixed bug (ZipArchive::extractTo extracts outside of destination) (CVE-2021-21706).
The severity of CVE-2021-21706 is medium.
PHP versions 7.3.x below 7.3.31, 7.4.x below 7.4.24, and 8.0.x below 8.0.11 are affected by CVE-2021-21706.
In a Microsoft Windows environment, an attacker can trick ZipArchive::extractTo into writing a file outside the target directory when extracting a ZIP file.