Skip to content
Fencer Vulns
medium 5.3

CVE-2021-21706 json

ZipArchive::extractTo may extract outside of destination dir

published 2021-10-04 5 y ago modified 2026-09-08 2 mo ago also BIT-libphp-2021-21706 , BIT-php-2021-21706 , BIT-php-min-2021-21706 , EUVD-2021-8878

cvss
5.3
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
1.5%
EPSS 1.5% chance of exploitation in 30 days, percentile 74%
public exploits
0
none known

Summary

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.

Patch / fix

  • bitnami libphp 7.3.31, 7.4.24, 8.0.11
  • bitnami php 7.3.31, 7.4.24, 8.0.11
  • bitnami php-min 7.3.31, 7.4.24, 8.0.11
  • PHP Group PHP 7.3.31, 7.4.24, 8.0.11
  • php7 SLES for SAP 15 SP2, SLES 15 SP2-LTSS, SLES 15 SP2-BCL +10 more 7.4.33-150200.3.46.2
  • php7-test openSUSE Leap 15.3 7.4.33-150200.3.46.2
  • php74 SLE Software Development Kit 12 SP5, SLE Module for Web and Scripting 12 7.4.33-1.47.2

suse advisories SUSE-SU-2022:4069-1SUSE-SU-2022:4068-1

  • php7 openSUSE Tumbleweed 7.4.24-1.1
  • php8 openSUSE Tumbleweed 8.0.11-1.1

opensuse advisories openSUSE-SU-2024:11167-1openSUSE-SU-2024:11169-1

  • php7 Alpine 3.12 7.3.31-r0
  • php7 Alpine 3.15, Alpine 3.14, Alpine 3.13 7.4.24-r0
  • php8 Alpine 3.16, Alpine 3.15, Alpine 3.14 +1 more 8.0.11-r0
  • php81 Alpine 3.19, Alpine 3.18, Alpine 3.17 +1 more 8.1.0_rc3-r0

alpine advisories ALPINE-CVE-2021-21706

Alpine secdb © Alpine Linux, from https://secdb.alpinelinux.org via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

cisa ICSA-26-027-02 updated cvss 6.5

Festo Didactic SE MES PC

  • Festo Didactic SE MES PC shipped_with_Windows_10
    affected: vendor fix

Facts from CISA's republication of the vendor's own advisory (CSAF); the linked advisory is the authoritative source. CISA notification · csaf

Exploit prediction

1.52% chance of exploitation in the next 30 days, higher than 74% of all scored CVEs (FIRST EPSS, 2026-11-08).

CVSS scores

assigned by version score vector
CNA 3.1 5.3 CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
NVD 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N
NVD 2.0 4.3 AV:N/AC:M/Au:N/C:N/I:P/A:N
OSV 3.1 6.5 CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N

Affected packages

ecosystem package affected fixed in
bitnami libphp
>=7.3.0, <7.3.31
>=7.4.0, <7.4.24
>=8.0.0, <8.0.11
7.3.31
7.4.24
8.0.11
bitnami php
>=7.3.0, <7.3.31
>=7.4.0, <7.4.24
>=8.0.0, <8.0.11
7.3.31
7.4.24
8.0.11
bitnami php-min
>=7.3.0, <7.3.31
>=7.4.0, <7.4.24
>=8.0.0, <8.0.11
7.3.31
7.4.24
8.0.11

Affected products

  • PHP Group PHP

Classification

Weakness
  • CWE-24 Path Traversal: '../filedir'
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory
Technology feeds

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.