CVE-2021-21706

ZipArchive::extractTo may extract outside of destination dir

State
Published
Severity
5.3 Medium
Published
Oct 4, 2021
Updated
Sep 16, 2024
Reserved
Jan 4, 2021

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.15.3 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:Nphp

Weaknesses

  • CWE-24 Path Traversal: '../filedir'

Affected Products

ProductVersions
PHPPHP Group
  • 7.3.x to before 7.3.31Affected
  • 7.4.x to before 7.4.24Affected
  • 8.0.X to before 8.0.11Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.