CVE-2023-3823: Security issue with external entity loading in XML without enabling it

Published Aug 3, 2023
·
Updated

Fixed bug GHSA-3qrf-m4j2-pcrr (Security issue with external entity loading in XML without enabling it). (CVE-2023-3823)

Other sources

In PHP versions 8.0. before 8.0.30, 8.1. before 8.1.22, and 8.2. before 8.2.8 various XML functions rely on libxml global state to track configuration variables, like whether external entities are loaded. This state is assumed to be unchanged unless the user explicitly changes it by calling appropriate function. However, since the state is process-global, other modules - such as ImageMagick - may also use this library within the same process, and change that global state for their internal purposes, and leave it in a state where external entities loading is enabled. This can lead to the situation where external XML is parsed with external entities loaded, which can lead to disclosure of any local files accessible to PHP. This vulnerable state may persist in the same process across many requests, until the process is shut down.

Launchpad

Affected Software

14 affected componentsFixes available
debian/php7.4
7.4.33-1+deb11u5
debian/php8.2
8.2.20-1~deb12u18.2.23-1
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 azl3 php 8.3.19-1<8.2.8-1
8.2.8-1
Microsoft cbl2 php 8.1.22-1<8.1.22-1
8.1.22-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

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

    Fixed in 7.4.33-1+deb11u5
  2. Upgrade

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

    Fixed in 8.2.20-1~deb12u1Fixed in 8.2.23-1
  3. Upgrade

    Upgrade PHP to a version that resolves this vulnerability.

    Fixed in 8.0.30
  4. Upgrade

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

    Fixed in 8.2.9
  5. Upgrade

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

    Fixed in 8.1.22
  6. Upgrade

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

    Fixed in 8.0.30
  7. Upgrade

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

    Fixed in 8.2.8-1
  8. Upgrade

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

    Fixed in 8.1.22-1
  9. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 8.0.30
  10. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 8.1.22
  11. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 8.2.8
  12. Upgrade

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

    Patch GHSA-3qrf-m4j2-pcrr

Event History

Aug 3, 2023
CVE Published
via PHP·12:00 AM
Aug 5, 2023
Data Sourced
via Red Hat·04:16 PM
DescriptionSeverityAffected Software
Aug 11, 2023
CVE Published
via MITRE·05:42 AM
Data Sourced
via MITRE·05:42 AM
DescriptionSeverity
Aug 23, 2023
Data Sourced
via Microsoft·07:00 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·07:00 AM
Affected Software
Updated
via Microsoft·07:00 AM
DescriptionSeverity
Jan 12, 2024
Data Sourced
via Launchpad·12:22 AM
Description
Sep 16, 2024
Data Sourced
via Ubuntu·04:15 AM
RemedyDescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the vulnerability ID for this security issue?

The vulnerability ID for this security issue is CVE-2023-3823.

2

What is the severity of CVE-2023-3823?

CVE-2023-3823 has a severity value of 7.5, which is considered high.

3

Which versions of PHP are affected by CVE-2023-3823?

PHP versions 8.0.* before 8.0.30, 8.1.* before 8.1.22, and 8.2.* before 8.2.8 are affected by CVE-2023-3823.

4

How can I fix CVE-2023-3823?

To fix CVE-2023-3823, upgrade to PHP version 8.2.9 or higher.

5

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

You can find more information about CVE-2023-3823 in the [PHP ChangeLog](https://www.php.net/ChangeLog-8.php#8.2.9), [CVE Details](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2023-3823), and [GitHub Advisory](https://github.com/php/php-src/security/advisories/GHSA-3qrf-m4j2-pcrr).

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