CVE-2023-3824: Buffer overflow and overread in phar_dir_read()

Published Aug 3, 2023
·
Updated

Buffer overflow and overread in phardirread()

Other sources

Fixed bug GHSA-jqcx-ccgc-xwhv (Buffer mismanagement in phardirread()). (CVE-2023-3824)

— PHP

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.

— MITRE

Affected Software

16 affected componentsFixes available
PHP PHP>=8.0.0<8.0.30
PHP PHP>=8.1.0<8.1.22
PHP PHP>=8.2.0<8.2.8
PHP PHP<8.0.30
8.0.30
PHP PHP>=8.2.0<8.2.9
Fedoraproject Fedora=38
Debian Debian Linux=10.0
redhat/php<8.2.9
8.2.9
redhat/php<8.1.22
8.1.22
redhat/php<8.0.30
8.0.30
Microsoft cbl2 php 8.1.22-1<8.1.22-1
8.1.22-1
Microsoft azl3 php 8.3.19-1<8.2.8-1
8.2.8-1
debian/php8.2
8.2.32-1~deb12u18.2.35-1~deb12u1
alpine/php8<8.0.30-r0
8.0.30-r0
alpine/php81<8.1.22-r0
8.1.22-r0
alpine/php81<8.1.22-r0
8.1.22-r0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.0.30
  2. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 8.2.9
  3. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 8.1.22
  4. Upgrade

    Upgrade redhat/php to a version that resolves this vulnerability.

    Fixed in 8.0.30
  5. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.1.22-1
  6. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Fixed in 8.2.8-1
  7. Upgrade

    Upgrade debian/php8.2 to a version that resolves this vulnerability.

    Fixed in 8.2.32-1~deb12u1Fixed in 8.2.35-1~deb12u1
  8. Upgrade

    Upgrade alpine/php8 to a version that resolves this vulnerability.

    Fixed in 8.0.30-r0
  9. Upgrade

    Upgrade alpine/php81 to a version that resolves this vulnerability.

    Fixed in 8.1.22-r0
  10. Upgrade

    Upgrade php/phar (phar_dir_read) to a version that resolves this vulnerability.

    Fixed in 8.0.30
  11. Upgrade

    Upgrade php/phar (phar_dir_read) to a version that resolves this vulnerability.

    Fixed in 8.1.22
  12. Upgrade

    Upgrade php/phar (phar_dir_read) to a version that resolves this vulnerability.

    Fixed in 8.2.8
  13. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch GHSA-jqcx-ccgc-xwhv

Event History

Aug 3, 2023
CVE Published
via PHP·12:00 AM
Aug 8, 2023
Data Sourced
via Red Hat·05:55 PM
DescriptionSeverityAffected Software
Aug 11, 2023
CVE Published
via MITRE·05:48 AM
Data Sourced
via MITRE·05:48 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·06:15 AM
DescriptionSeverityWeaknessAffected Software
Data Sourced
via OSV·06:15 AM
DescriptionSeverityAffected Software
Aug 22, 2023
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeaknessAffected Software
Feb 20, 2024
News Published
via The Register·04:00 PM
Feb 25, 2024
News Published
via BleepingComputer·07:41 PM

Parent advisories

This vulnerability appears in the following advisories.

Peer vulnerabilities

Found alongside the following vulnerabilities.

Frequently Asked Questions

1

What is the severity of CVE-2023-3824?

The severity of CVE-2023-3824 is critical.

2

How does CVE-2023-3824 affect PHP?

CVE-2023-3824 affects PHP versions 8.0.* before 8.0.30, 8.1.* before 8.1.22, and 8.2.* before 8.2.8.

3

What is the potential impact of CVE-2023-3824?

CVE-2023-3824 can lead to memory corruption or remote code execution (RCE).

4

How can I fix CVE-2023-3824?

To fix CVE-2023-3824, upgrade PHP to version 8.2.9 or later.

5

Where can I find more information about CVE-2023-3824?

You can find more information about CVE-2023-3824 at the following references: [Link 1](https://www.php.net/ChangeLog-8.php#8.2.9), [Link 2](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-3824), [Link 3](https://github.com/php/php-src/security/advisories/GHSA-jqcx-ccgc-xwhv)

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203