Skip to content
Heist/ feed
Back to feed
Critical

Buffer overflow and overread in phar_dir_read()

Type: advisorySources: OSV

In PHP version 8.0.* before 8.0.30, 8.1.* before 8.1.22, and 8.2.* before 8.2.8, when loading phar file, while reading PHAR directory entries, insufficient length checking may lead to a stack buffer overflow, leading potentially to memory corruption or RCE.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-3824
Confirmed fixed CVEs
Not specified
Updated in this feed
3 Nov 2026, 03:57 UTC · Revision 1

Source evidence

Buffer overflow and overread in phar_dir_read()

core-osv · Original source

Published 11 Aug 2023, 05:48 UTC

In PHP version 8.0.* before 8.0.30, 8.1.* before 8.1.22, and 8.2.* before 8.2.8, when loading phar file, while reading PHAR directory entries, insufficient length checking may lead to a stack buffer overflow, leading potentially to memory corruption or RCE.

osv:CVE-2023-3824
Complete source record
{
  "id": "9a736973c822e58e8e787a9dfd50f81b6d0494be98be490486cf4fdd77fd9a53",
  "url": "https://osv.dev/vulnerability/CVE-2023-3824",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Buffer overflow and overread in phar_dir_read()",
    "summary": "In PHP version 8.0.* before 8.0.30, 8.1.* before 8.1.22, and 8.2.* before 8.2.8, when loading phar file, while reading PHAR directory entries, insufficient length checking may lead to a stack buffer overflow, leading potentially to memory corruption or RCE.",
    "evidence": "osv:CVE-2023-3824",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2023-3824",
      "aliases": [
        "BIT-libphp-2023-3824",
        "BIT-php-2023-3824",
        "BIT-php-min-2023-3824",
        "CVE-2023-3824",
        "GHSA-jqcx-ccgc-xwhv"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/php/php-src",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5dc92c2117cafc61daaaaa240fd46c3ac33872a4"
                },
                {
                  "fixed": "8213daa932be1c2ae04726233e4e56e5df63980e"
                },
                {
                  "introduced": "381ba9f5d0edd0c9c8ec1dea7e21d513ad08b115"
                },
                {
                  "fixed": "5ffbd1ad43d2a98cd1fd91e2b20672fac30cd4c0"
                },
                {
                  "introduced": "70ee6c20ad97e02c2b8098aeea96fefbbc3ac5c2"
                },
                {
                  "fixed": "3d832da8f53d2c2f93d4ffbd1c807d9a5d66536b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.0.0"
                      },
                      {
                        "fixed": "8.0.30"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.1.0"
                      },
                      {
                        "fixed": "8.1.22"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.2.0"
                      },
                      {
                        "fixed": "8.2.9"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-3824.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:25.663846939Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2023/09/msg00002.html",
        "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7NBF77WN6DTVTY2RE73IGPYD6M4PIAWA/",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/3xxx/CVE-2023-3824.json",
        "https://github.com/php/php-src/security/advisories/GHSA-jqcx-ccgc-xwhv",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-3824",
        "https://security.netapp.com/advisory/ntap-20230825-0001/"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-119"
        ],
        "cna_assigner": "php",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/3xxx/CVE-2023-3824.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-3824",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 492299,
  "published_at": "2023-08-11T05:48:34.082+00:00"
}