Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-21706

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-21706
Confirmed fixed CVEs
Not specified
Updated in this feed
1 Nov 2026, 07:45 UTC · Revision 1

Source evidence

CVE-2021-21706

core-osv · Original source

Published 4 Oct 2021, 04:15 UTC

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.

osv:CVE-2021-21706
Complete source record
{
  "id": "c85b4ab06676ae5032b7f35ccb4e91e0bf75f7dad8953d2bf380809da0213785",
  "url": "https://osv.dev/vulnerability/CVE-2021-21706",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-21706",
    "summary": "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.",
    "evidence": "osv:CVE-2021-21706",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-21706",
      "aliases": [
        "BIT-libphp-2021-21706",
        "BIT-php-2021-21706",
        "BIT-php-min-2021-21706",
        "CVE-2021-21706"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/php/php-src",
              "type": "GIT",
              "events": [
                {
                  "introduced": "52ace952a1b65ca80fc2617f11c2fa6dd03f51bd"
                },
                {
                  "fixed": "b54c8f052134668b13c4a3177f16b08d82233ade"
                },
                {
                  "introduced": "3c7824e16ec4c3cee417262445d2c2b66531c10f"
                },
                {
                  "fixed": "7d959d16546198e8012985109e5689abcae18b5f"
                },
                {
                  "introduced": "5dc92c2117cafc61daaaaa240fd46c3ac33872a4"
                },
                {
                  "fixed": "ca647c529295a4fde269e9a4dfa19fc4f245501c"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "7.3.0"
                      },
                      {
                        "fixed": "7.3.31"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "7.4.0"
                      },
                      {
                        "fixed": "7.4.24"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.0.0"
                      },
                      {
                        "fixed": "8.0.11"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-21706.json"
          }
        }
      ],
      "modified": "2026-10-24T10:30:57.925037398Z",
      "provider": "osv",
      "references": [
        "https://security.netapp.com/advisory/ntap-20211029-0007/",
        "https://bugs.php.net/bug.php?id=81420"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-21706",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 438964,
  "published_at": "2021-10-04T04:15:08.35+00:00"
}