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

18 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
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
debian/php8.2
8.2.18-1~deb12u18.2.10-1
debian/php7.3
7.3.31-1~deb10u5
debian/php7.4
7.4.33-1+deb11u5

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 alpine/php8 to a version that resolves this vulnerability.

    Fixed in 8.0.30-r0
  8. Upgrade

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

    Fixed in 8.1.22-r0
  9. Upgrade

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

    Fixed in 8.2.18-1~deb12u1Fixed in 8.2.10-1
  10. Upgrade

    Upgrade debian/php7.3 to a version that resolves this vulnerability.

    Fixed in 7.3.31-1~deb10u5
  11. Upgrade

    Upgrade debian/php7.4 to a version that resolves this vulnerability.

    Fixed in 7.4.33-1+deb11u5
  12. Upgrade

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

    Fixed in 8.0.30
  13. Upgrade

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

    Fixed in 8.1.22
  14. Upgrade

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

    Fixed in 8.2.8
  15. 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
12:00 AM
Data Sourced
12:00 AM
DescriptionAffected Software
Updated
12:00 AM
Affected Software
Aug 8, 2023
Data Sourced
05:55 PM
Severity
Aug 11, 2023
Data Sourced
12:00 AM
Remedy
Data Sourced
via Ubuntu·12:00 AM
RemedyDescriptionSeverityAffected Software
Updated
12:00 AM
Affected Software
Updated
via Ubuntu·12:00 AM
DescriptionAffected Software
CVE Published
via MITRE·05:48 AM
Data Sourced
via MITRE·05:48 AM
DescriptionSeverityWeakness
Event
via MITRE·05:48 AM
Data Sourced
06:15 AM
Weakness
Data Sourced
via OSV·06:15 AM
DescriptionSeverityAffected Software
Aug 21, 2023
Updated
04:31 PM
SeverityWeakness
Aug 22, 2023
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Oct 27, 2023
Updated
06:58 PM
Affected Software
Dec 6, 2023
Updated
10:39 AM
Severity
Jan 4, 2024
Data Sourced
via Red Hat·09:53 AM
DescriptionSeverityAffected Software
Feb 20, 2024
News Published
via The Register·04:00 PM
Feb 25, 2024
News Published
via BleepingComputer·07:41 PM
Mar 18, 2024
Exploit Published
via GitHub·10:45 AM
Feb 13, 2025
Data Sourced
via NVD·05:16 PM
DescriptionSeverityWeaknessAffected Software
Updated
via NVD·05:16 PM
DescriptionAffected Software
Jun 17, 2026
Updated
via NVD·06:14 AM
DescriptionAffected Software

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