CVE-2021-21706
ZipArchive::extractTo may extract outside of destination dir
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- None
- User interaction
- Required
What an attacker can affect
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
5.3
ZipArchive::extractTo may extract outside of destination dir
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.
- Record
CVE-2021-21706- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N - Weakness
- CWE-24
- Updated
- 2026-11-02
EUVDEUVD-2021-8878
5.3
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.
- Record
EUVD-2021-8878- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-x4g4-47f7-vvq4 No score
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...
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.
- Record
GHSA-x4g4-47f7-vvq4- Weakness
- CWE-22
- Updated
- 2026-11-02
NVD
5.3
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.
- Record
CVE-2021-21706- CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N - CVSS 2.0
- 4.3 Medium
AV:N/AC:M/Au:N/C:N/I:P/A:N - Weakness
- CWE-24, CWE-22
- Updated
- 2026-11-02
OSVALPINE-CVE-2021-21706
6.5
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.
- Record
ALPINE-CVE-2021-21706- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N - Updated
- 2026-11-03
OSVBELL-CVE-2021-21706
6.5
CVE-2021-21706 does not affect BellSoft software
- Record
BELL-CVE-2021-21706- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
Show 9 moreShow less
OSV
6.5
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.
- Record
CVE-2021-21706- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-21706
6.5
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.
- Record
UBUNTU-CVE-2021-21706- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N - CVSS 3.1
- 5.3 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N - Updated
- 2026-11-02
OSVBIT-libphp-2021-21706 No score
ZipArchive::extractTo may extract outside of destination dir
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.
- Record
BIT-libphp-2021-21706- Updated
- 2026-11-02
OSVBIT-php-2021-21706 No score
ZipArchive::extractTo may extract outside of destination dir
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.
- Record
BIT-php-2021-21706- Updated
- 2026-11-02
OSVBIT-php-min-2021-21706 No score
ZipArchive::extractTo may extract outside of destination dir
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.
- Record
BIT-php-min-2021-21706- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11167-1 No score
php7-7.4.24-1.1 on GA media
These are all security issues fixed in the php7-7.4.24-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11167-1- Updated
- 2026-11-02
OSVopenSUSE-SU-2024:11169-1 No score
php8-8.0.11-1.1 on GA media
These are all security issues fixed in the php8-8.0.11-1.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2024:11169-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:4068-1 No score
Security update for php74
This update for php74 fixes the following issues:
-
Version update to 7.4.33:
-
CVE-2022-31630: Fixed out-of-bounds read due to insufficient input validation in imageloadfont() (bsc#1204979).
-
CVE-2022-37454: Fixed buffer overflow in hash_update() on long parameter (bsc#1204577).
-
Version update to 7.4.32 (jsc#SLE-23639)
-
CVE-2022-31628: Fixed an uncontrolled recursion in the phar uncompressor while decompressing 'quines' gzip files. (bsc#1203867)
-
CVE-2022-31629: Fixed a bug which could lead an attacker to set an insecure cookie that will treated as secure in the victim's browser. (bsc#1203870)
- Record
SUSE-SU-2022:4068-1- Updated
- 2026-11-02
OSVSUSE-SU-2022:4069-1 No score
Security update for php7
This update for php7 fixes the following issues:
-
Version update to 7.4.33:
-
CVE-2022-31630: Fixed out-of-bounds read due to insufficient input validation in imageloadfont() (bsc#1204979).
-
CVE-2022-37454: Fixed buffer overflow in hash_update() on long parameter (bsc#1204577).
-
Version update to 7.4.32 (jsc#SLE-23639)
-
CVE-2022-31628: Fixed an uncontrolled recursion in the phar uncompressor while decompressing 'quines' gzip files. (bsc#1203867)
-
CVE-2022-31629: Fixed a bug which could lead an attacker to set an insecure cookie that will treated as secure in the victim's browser. (bsc#1203870)
- Record
SUSE-SU-2022:4069-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
php7Alpine:v3.12 |
before 7.3.31-r0 | 7.3.31-r0 |
php7Alpine:v3.13 |
before 7.4.24-r0 | 7.4.24-r0 |
php7Alpine:v3.14 |
before 7.4.24-r0 | 7.4.24-r0 |
php7Alpine:v3.15 |
before 7.4.24-r0 | 7.4.24-r0 |
php8Alpine:v3.13 |
before 8.0.11-r0 | 8.0.11-r0 |
php8Alpine:v3.14 |
before 8.0.11-r0 | 8.0.11-r0 |
php8Alpine:v3.15 |
before 8.0.11-r0 | 8.0.11-r0 |
php8Alpine:v3.16 |
before 8.0.11-r0 | 8.0.11-r0 |
php81Alpine:v3.16 |
before 8.1.0_rc3-r0 | 8.1.0_rc3-r0 |
php81Alpine:v3.17 |
before 8.1.0_rc3-r0 | 8.1.0_rc3-r0 |
Show 23 moreShow less
| Package | Affected | Fixed |
|---|---|---|
php81Alpine:v3.18 |
before 8.1.0_rc3-r0 | 8.1.0_rc3-r0 |
php81Alpine:v3.19 |
before 8.1.0_rc3-r0 | 8.1.0_rc3-r0 |
libphpBitnami |
7.3.0 up to 7.3.31, 7.4.0 up to 7.4.24, 8.0.0 up to 8.0.11 | 7.3.317.4.248.0.11 |
phpBitnami |
7.3.0 up to 7.3.31, 7.4.0 up to 7.4.24, 8.0.0 up to 8.0.11 | 7.3.317.4.248.0.11 |
php-minBitnami |
7.3.0 up to 7.3.31, 7.4.0 up to 7.4.24, 8.0.0 up to 8.0.11 | 7.3.317.4.248.0.11 |
php74SUSE:Linux Enterprise Module for Web and Scripting 12 From an advisory covering 18 CVEs |
before 7.4.33-1.47.2 | 7.4.33-1.47.2 |
php74SUSE:Linux Enterprise Software Development Kit 12 SP5 From an advisory covering 18 CVEs |
before 7.4.33-1.47.2 | 7.4.33-1.47.2 |
php7SUSE:Linux Enterprise Module for Package Hub 15 SP3 From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7SUSE:Linux Enterprise Module for Web and Scripting 15 SP3 From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7SUSE:Linux Enterprise High Performance Computing 15 SP2-ESPOS From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7SUSE:Linux Enterprise High Performance Computing 15 SP2-LTSS From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7SUSE:Linux Enterprise Server 15 SP2-BCL From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7SUSE:Linux Enterprise Server 15 SP2-LTSS From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7SUSE:Linux Enterprise Server for SAP Applications 15 SP2 From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7SUSE:Manager Proxy 4.1 From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7SUSE:Manager Retail Branch Server 4.1 From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7SUSE:Manager Server 4.1 From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7SUSE:Enterprise Storage 7 From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7openSUSE:Leap 15.3 From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7-testopenSUSE:Leap 15.3 From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7openSUSE:Leap 15.4 From an advisory covering 18 CVEs |
before 7.4.33-150200.3.46.2 | 7.4.33-150200.3.46.2 |
php7openSUSE:Tumbleweed From an advisory covering 44 CVEs |
before 7.4.24-1.1 | 7.4.24-1.1 |
php8openSUSE:Tumbleweed From an advisory covering 97 CVEs |
before 8.0.11-1.1 | 8.0.11-1.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, facts | ||
| affected, aliases, references | OSV | |
| affected | ||
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-21706 is a medium vulnerability (CVSS 5.3) in Php, published October 4, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.52%, the 74th percentile. Fixed in php7 7.3.31-r0.
References
bugs.php.net/bug.php?id=81420
security.netapp.com/advisory/ntap-20211029-0007
nvd.nist.gov/vuln/detail/CVE-2021-21706
github.com/advisories/GHSA-x4g4-47f7-vvq4
security.alpinelinux.org/vuln/CVE-2021-21706
docs.bell-sw.com/security/cves/CVE-2021-21706
Show 122 moreShow less
suse.com/support/update/announcement/2022/suse-su-20224068-1
bugzilla.suse.com/1203867
bugzilla.suse.com/1203870
bugzilla.suse.com/1204577
bugzilla.suse.com/1204979
suse.com/security/cve/CVE-2017-8923
suse.com/security/cve/CVE-2020-7068
suse.com/security/cve/CVE-2020-7069
suse.com/security/cve/CVE-2020-7070
suse.com/security/cve/CVE-2020-7071
suse.com/security/cve/CVE-2021-21702
suse.com/security/cve/CVE-2021-21703
suse.com/security/cve/CVE-2021-21704
suse.com/security/cve/CVE-2021-21705
suse.com/security/cve/CVE-2021-21706
suse.com/security/cve/CVE-2021-21707
suse.com/security/cve/CVE-2021-21708
suse.com/security/cve/CVE-2022-31625
suse.com/security/cve/CVE-2022-31626
suse.com/security/cve/CVE-2022-31628
suse.com/security/cve/CVE-2022-31629
suse.com/security/cve/CVE-2022-31630
suse.com/security/cve/CVE-2022-37454
suse.com/support/update/announcement/2022/suse-su-20224069-1
ubuntu.com/security/CVE-2021-21706
cve.org/CVERecord?id=CVE-2021-21706
suse.com/security/cve/CVE-2005-3353
suse.com/security/cve/CVE-2005-3388
suse.com/security/cve/CVE-2005-3389
suse.com/security/cve/CVE-2005-3390
suse.com/security/cve/CVE-2005-3391
suse.com/security/cve/CVE-2005-3392
suse.com/security/cve/CVE-2006-0996
suse.com/security/cve/CVE-2006-1017
suse.com/security/cve/CVE-2006-1490
suse.com/security/cve/CVE-2006-1494
suse.com/security/cve/CVE-2006-1991
suse.com/security/cve/CVE-2007-4783
suse.com/security/cve/CVE-2007-4887
suse.com/security/cve/CVE-2008-0599
suse.com/security/cve/CVE-2017-9120
suse.com/security/cve/CVE-2018-1000222
suse.com/security/cve/CVE-2018-1000888
suse.com/security/cve/CVE-2018-12882
suse.com/security/cve/CVE-2018-14851
suse.com/security/cve/CVE-2018-17082
suse.com/security/cve/CVE-2018-19935
suse.com/security/cve/CVE-2018-20783
suse.com/security/cve/CVE-2019-11034
suse.com/security/cve/CVE-2019-11035
suse.com/security/cve/CVE-2019-11036
suse.com/security/cve/CVE-2019-11039
suse.com/security/cve/CVE-2019-11040
suse.com/security/cve/CVE-2019-11041
suse.com/security/cve/CVE-2019-11042
suse.com/security/cve/CVE-2019-11043
suse.com/security/cve/CVE-2019-11046
suse.com/security/cve/CVE-2019-9020
suse.com/security/cve/CVE-2019-9021
suse.com/security/cve/CVE-2019-9022
suse.com/security/cve/CVE-2019-9023
suse.com/security/cve/CVE-2019-9024
suse.com/security/cve/CVE-2019-9637
suse.com/security/cve/CVE-2019-9638
suse.com/security/cve/CVE-2019-9640
suse.com/security/cve/CVE-2019-9641
suse.com/security/cve/CVE-2019-9675
suse.com/security/cve/CVE-2020-7062
suse.com/security/cve/CVE-2020-7063
suse.com/security/cve/CVE-2006-7243
suse.com/security/cve/CVE-2010-2225
suse.com/security/cve/CVE-2010-2950
suse.com/security/cve/CVE-2010-3436
suse.com/security/cve/CVE-2010-3709
suse.com/security/cve/CVE-2010-3710
suse.com/security/cve/CVE-2010-4150
suse.com/security/cve/CVE-2010-4645
suse.com/security/cve/CVE-2011-0420
suse.com/security/cve/CVE-2011-0421
suse.com/security/cve/CVE-2011-0708
suse.com/security/cve/CVE-2011-1092
suse.com/security/cve/CVE-2011-1153
suse.com/security/cve/CVE-2011-1466
suse.com/security/cve/CVE-2011-2202
suse.com/security/cve/CVE-2011-3379
suse.com/security/cve/CVE-2011-4153
suse.com/security/cve/CVE-2011-4566
suse.com/security/cve/CVE-2011-4885
suse.com/security/cve/CVE-2012-0830
suse.com/security/cve/CVE-2012-1823
suse.com/security/cve/CVE-2012-2688
suse.com/security/cve/CVE-2012-3365
suse.com/security/cve/CVE-2013-1635
suse.com/security/cve/CVE-2013-1643
suse.com/security/cve/CVE-2013-4113
suse.com/security/cve/CVE-2013-4248
suse.com/security/cve/CVE-2013-6420
suse.com/security/cve/CVE-2013-6712
suse.com/security/cve/CVE-2013-7327
suse.com/security/cve/CVE-2013-7345
suse.com/security/cve/CVE-2014-0185
suse.com/security/cve/CVE-2014-0238
suse.com/security/cve/CVE-2014-1943
suse.com/security/cve/CVE-2014-2497
suse.com/security/cve/CVE-2014-3538
suse.com/security/cve/CVE-2014-3597
suse.com/security/cve/CVE-2014-3622
suse.com/security/cve/CVE-2014-3668
suse.com/security/cve/CVE-2014-3670
suse.com/security/cve/CVE-2014-4049
suse.com/security/cve/CVE-2014-4670
suse.com/security/cve/CVE-2014-4698
suse.com/security/cve/CVE-2014-5459
suse.com/security/cve/CVE-2014-9426
suse.com/security/cve/CVE-2014-9427
suse.com/security/cve/CVE-2015-0231
suse.com/security/cve/CVE-2015-0235
suse.com/security/cve/CVE-2015-0273
suse.com/security/cve/CVE-2015-1351
suse.com/security/cve/CVE-2015-3152
suse.com/security/cve/CVE-2015-3414
suse.com/security/cve/CVE-2015-3415