CVE-2021-21706

ZipArchive::extractTo may extract outside of destination dir

Description

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.

Categories

5.3
CVSS
Severity: Medium
CVSS 3.1 •
CVSS 2.0 •
EPSS 0.75% Top 30%
Vendor Advisory php.net
Affected: PHP Group PHP
Published at:
Updated at:

References

Link Tags
https://bugs.php.net/bug.php?id=81420 patch vendor advisory issue tracking
https://security.netapp.com/advisory/ntap-20211029-0007/ third party advisory

Frequently Asked Questions

What is the severity of CVE-2021-21706?
CVE-2021-21706 has been scored as a medium severity vulnerability.
How to fix CVE-2021-21706?
To fix CVE-2021-21706, make sure you are using an up-to-date version of the affected component(s) by checking the vendor release notes. As for now, there are no other specific guidelines available.
Is CVE-2021-21706 being actively exploited in the wild?
As for now, there are no information to confirm that CVE-2021-21706 is being actively exploited. According to its EPSS score, there is a ~1% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2021-21706?
CVE-2021-21706 affects PHP Group PHP.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.