PortGate

Advisories · PHP & Laravel

CVE-2023-3824 Critical CVSS 9.8

PHP phar buffer overflow

Disclosed 2023 · Last reviewed 2 Dec 2026

A crafted phar archive could overflow a buffer when PHP opened it.

What happened

Phar header parsing wrote past the end of a buffer.

Affected and patched versions

Affected
PHP 8.0 before 8.0.30, 8.1 before 8.1.22, and 8.2 before 8.2.8.
Patched
PHP 8.0.30, 8.1.22, 8.2.8, and later.

How to check your server

Check

php -v

How to fix and harden

  1. Upgrade PHP.
  2. Do not open phar archives from users. phar.readonly should stay On.

Fix

php -v

Sources

Version ranges and fixes follow the vendor advisory. When a distribution backports a fix, trust its security tracker over the upstream version number. New advisories: RSS · JSON