CWE
22 24
Advisory Published
Updated

CVE-2021-21706: ZipArchive::extractTo may extract outside of destination dir

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 SoftwareAffected VersionHow 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

Never miss a vulnerability like this again

Sign up to SecAlerts for real-time vulnerability data matched to your software, aggregated from hundreds of sources.

Frequently Asked Questions

  • What is the vulnerability ID of this bug?

    The vulnerability ID of this bug is CVE-2021-21706.

  • What is the title of this bug?

    The title of this bug is Fixed bug (ZipArchive::extractTo extracts outside of destination) (CVE-2021-21706).

  • What is the severity of CVE-2021-21706?

    The severity of CVE-2021-21706 is medium.

  • Which versions of PHP are affected by CVE-2021-21706?

    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.

  • How can CVE-2021-21706 be exploited?

    In a Microsoft Windows environment, an attacker can trick ZipArchive::extractTo into writing a file outside the target directory when extracting a ZIP file.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2024 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203