VDB

CVE-2021-21706

CVE-2021-21706 PUBLISHED CVSS 5.3 MEDIUM

ZipArchive::extractTo may extract outside of destination dir

Reported by php · Published October 4, 2021

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.

Fixed versions

Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.

PackageEcosystemFixed in
php-minBitnami8.0.11, 7.4.24, 7.3.31
php7Alpine7.4.24-r0, 7.3.31-r0
libphpBitnami8.0.11, 7.4.24, 7.3.31
php8Alpine8.0.11-r0
php81Alpine8.1.0_rc3-r0
phpBitnami8.0.11, 7.4.24, 7.3.31
phpBitnami8.0.11, 7.4.24, 7.3.31
libphpBitnami8.0.11, 7.4.24, 7.3.31
phpphp8.0.11, 7.4.24, 7.3.31
php8.1Ubuntu:22.04:LTS8.1.0-1
PHPPHP Group8.0.11, 7.4.24, 7.3.31
php-minBitnami8.0.11, 7.4.24, 7.3.31

Risk scores

CVSS 3.1
5.3
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N

Affected products

VendorProductVersions
PHP GroupPHP7.3.x, 7.4.x, 8.0.X
archphp8.0.10-1
alpinephp70, 0
alpinephp80
PHP GroupPHP8.0.X, 7.3.x, 7.4.x
alpinephp810

Timeline

  • Sep 24, 2021 CVE Published
  • Oct 4, 2021 EPSS Score (30 in total, the first dated here)
  • Nov 21, 2024 CVE Updated
  • Jun 2, 2026 Security Advisory
  • Aug 26, 2026 Coalition ESS Score

Query this with the API

The same record, from the CLI:

vulnetix vdb vuln CVE-2021-21706
vulnetix vdb fixes CVE-2021-21706

Or with curl, using the org id and key from your account page:

curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
  "https://api.vdb.vulnetix.com/v2/vuln/CVE-2021-21706/fixes/registry"

The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart

References

  • x_refsource_MISC
  • x_refsource_CONFIRM
Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›