{"id":"CVE-2021-21706","state":"PUBLISHED","title":"ZipArchive::extractTo may extract outside of destination dir","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.","publishedAt":"2021-10-04T04:00:17.182Z","updatedAt":"2024-09-16T23:06:09.569Z","severity":{"score":5.3,"label":"Medium","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","source":"php"},"assigner":"php","products":["PHP Group PHP"],"affected":[{"vendor":"PHP Group","product":"PHP","versions":[{"version":"7.3.x","status":"affected","lessThan":"7.3.31","versionType":"custom"},{"version":"7.4.x","status":"affected","lessThan":"7.4.24","versionType":"custom"},{"version":"8.0.X","status":"affected","lessThan":"8.0.11","versionType":"custom"}],"platforms":["Windows"]}],"references":["https://bugs.php.net/bug.php?id=81420","https://security.netapp.com/advisory/ntap-20211029-0007/"],"weaknesses":["CWE-24"],"ingestedAt":"2026-10-29T19:47:59.168Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2021/21xxx/CVE-2021-21706.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2021-21706","state":"PUBLISHED","datePublished":"2021-10-04T04:00:17.182Z","dateUpdated":"2024-09-16T23:06:09.569Z","assignerShortName":"php","assignerOrgId":"dd77f84a-d19a-4638-8c3d-a322d820ed2b","dateReserved":"2021-01-04T00:00:00.000Z"},"containers":{"cna":{"title":"ZipArchive::extractTo may extract outside of destination dir","descriptions":[{"lang":"en","value":"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":[{"vendor":"PHP Group","product":"PHP","versions":[{"version":"7.3.x","status":"affected","lessThan":"7.3.31","versionType":"custom"},{"version":"7.4.x","status":"affected","lessThan":"7.4.24","versionType":"custom"},{"version":"8.0.X","status":"affected","lessThan":"8.0.11","versionType":"custom"}],"platforms":["Windows"]}],"references":[{"url":"https://bugs.php.net/bug.php?id=81420","tags":["x_refsource_MISC"]},{"url":"https://security.netapp.com/advisory/ntap-20211029-0007/","tags":["x_refsource_CONFIRM"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":5.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-24","description":"CWE-24 Path Traversal: '../filedir'","lang":"en","type":"CWE"}]}],"providerMetadata":{"shortName":"php","dateUpdated":"2021-10-29T12:06:47.000Z","orgId":"dd77f84a-d19a-4638-8c3d-a322d820ed2b"},"credits":[{"lang":"en","value":"reported by vi at hackberry dot xyz"}],"datePublic":"2021-09-21T00:00:00.000Z","source":{"defect":["https://bugs.php.net/bug.php?id=81420"],"discovery":"EXTERNAL"},"x_generator":{"engine":"Vulnogram 0.0.9"},"x_legacyV4Record":{"CVE_data_meta":{"ASSIGNER":"security@php.net","DATE_PUBLIC":"2021-09-21T11:32:00.000Z","ID":"CVE-2021-21706","STATE":"PUBLIC","TITLE":"ZipArchive::extractTo may extract outside of destination dir"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"PHP","version":{"version_data":[{"platform":"Windows","version_affected":"<","version_name":"7.3.x","version_value":"7.3.31"},{"platform":"Windows","version_affected":"<","version_name":"7.4.x","version_value":"7.4.24"},{"platform":"Windows","version_affected":"<","version_name":"8.0.X","version_value":"8.0.11"}]}}]},"vendor_name":"PHP Group"}]}},"credit":[{"lang":"eng","value":"reported by vi at hackberry dot xyz"}],"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"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."}]},"generator":{"engine":"Vulnogram 0.0.9"},"impact":{"cvss":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":5.3,"baseSeverity":"MEDIUM","confidentialityImpact":"NONE","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"REQUIRED","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-24 Path Traversal: '../filedir'"}]}]},"references":{"reference_data":[{"name":"https://bugs.php.net/bug.php?id=81420","refsource":"MISC","url":"https://bugs.php.net/bug.php?id=81420"},{"name":"https://security.netapp.com/advisory/ntap-20211029-0007/","refsource":"CONFIRM","url":"https://security.netapp.com/advisory/ntap-20211029-0007/"}]},"source":{"defect":["https://bugs.php.net/bug.php?id=81420"],"discovery":"EXTERNAL"}}},"adp":[{"title":"CVE Program Container","references":[{"url":"https://bugs.php.net/bug.php?id=81420","tags":["x_refsource_MISC","x_transferred"]},{"url":"https://security.netapp.com/advisory/ntap-20211029-0007/","tags":["x_refsource_CONFIRM","x_transferred"]}],"providerMetadata":{"shortName":"CVE","orgId":"af854a3a-2127-422b-91ae-364da2661108","dateUpdated":"2024-08-03T18:23:28.483Z"}}]}}}