Vulnerability · Published Oct 4, 2021 · Assigned by php
CVE-2021-21706ZipArchive::extractTo may extract outside of destination dir
Medium 5.3
In plain English
A medium-severity security flaw in PHP from PHP Group. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.5% (higher than 75% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)1.5%top 25.3% of all CVEs
Exploited in the wildNo reportsnot in CISA KEV
Attack toolingNoneno public tooling known
Official 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 packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu:22.04:LTS | php8.1 | 8.1.0-1 | UBUNTU-CVE-2021-21706 |
Affected products (as reported)
Weakness: CWE-24 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N
References
- https://bugs.php.net/bug.php?id=81420 x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20211029-0007/ x_refsource_CONFIRM