{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2021-21706","id":"CVE-2021-21706","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.","descriptionLong":"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.","published":"2021-10-04T04:00:17.182Z","updated":"2026-10-24T10:30:57.925037398Z","reserved":"2021-01-04T00:00:00.000Z","status":"Modified","rejected":false,"assigner":"php","metric":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"php"},"metrics":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"php"},{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"php.net"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"NVD"},{"version":"3.1","score":6.5,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N","rating":"medium","source":"OSV"},{"version":"2.0","score":4.3,"vector":"AV:N/AC:M/Au:N/C:N/I:P/A:N","rating":"medium","source":"NVD"}],"rating":"medium","products":["PHP Group PHP"],"affectedProducts":[{"vendor":"PHP Group","product":"PHP","defaultStatus":null,"versions":[{"lessThan":"7.3.31","status":"affected","version":"7.3.x","versionType":"custom"},{"lessThan":"7.4.24","status":"affected","version":"7.4.x","versionType":"custom"},{"lessThan":"8.0.11","status":"affected","version":"8.0.X","versionType":"custom"}],"platforms":["Windows"]}],"packages":[],"cwes":["CWE-24","CWE-22"],"aliases":["BIT-libphp-2021-21706","BIT-php-2021-21706","BIT-php-min-2021-21706"],"references":[{"url":"https://bugs.php.net/bug.php?id=81420","tags":["x_refsource_MISC","x_transferred","Issue Tracking","Patch","Vendor Advisory","fix"]},{"url":"https://security.netapp.com/advisory/ntap-20211029-0007/","tags":["x_refsource_CONFIRM","x_transferred","Third Party Advisory","advisory"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":null,"epss":0.01517,"epssPercentile":0.75088,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2021-21706","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-21706","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2021-21706","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2021-21706","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}