Skip to content
OpenAdvisories
Medium · 5.3 CVE-2021-21706 EUVD-2021-8878GHSA-x4g4-47f7-vvq4

ZipArchive::extractTo may extract outside of destination dir

Published Oct 4, 2021 · Updated Sep 16, 2024 · Assigned by php

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.

Affected products

VendorProductAffectedFixed
PHP Group PHP 7.3.x – < 7.3.31, 7.4.x – < 7.4.24, 8.0.X – < 8.0.11 7.3.31

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SLES 15 SP3 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SLES 15 SP2 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SLES 12 SP5 php74 7.4.33-1.47.2 SUSE-SU-2022:4068-1
SLES 12 php74 7.4.33-1.47.2 SUSE-SU-2022:4068-1
Show 6 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP2 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SLE HPC 15 SP2 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SUSE Manager Server 4.1 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SUSE Manager Retail Branch Server 4.1 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SUSE Manager Proxy 4.1 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
SUSE Enterprise Storage 7 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed php7 7.4.24-1.1 openSUSE-SU-2024:11167-1
openSUSE Tumbleweed php8 8.0.11-1.1 openSUSE-SU-2024:11169-1
openSUSE Leap 15.4 php7 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
openSUSE Leap 15.3 php7 +1 7.4.33-150200.3.46.2 SUSE-SU-2022:4069-1
ReleasePackageFixed inAdvisory
Alpine v3.19 php81 8.1.0_rc3-r0 —
Alpine v3.18 php81 8.1.0_rc3-r0 —
Alpine v3.17 php81 8.1.0_rc3-r0 —
Alpine v3.16 php8 8.0.11-r0 —
Alpine v3.16 php81 8.1.0_rc3-r0 —
Alpine v3.15 php7 7.4.24-r0 —
Alpine v3.15 php8 8.0.11-r0 —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.14 php7 7.4.24-r0 —
Alpine v3.14 php8 8.0.11-r0 —
Alpine v3.13 php7 7.4.24-r0 —
Alpine v3.13 php8 8.0.11-r0 —
Alpine v3.12 php7 7.3.31-r0 —

Advisories 7

References