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

19 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 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
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
debian/php8.2<8.2.18-1~deb12u1
8.2.18-1~deb12u1

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.2.8-1
  6. Upgrade

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

    Fixed in 8.1.22-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 debian/php8.2 to a version that resolves this vulnerability.

    Fixed in 8.2.18-1~deb12u1
  13. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 8.0.30
  14. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 8.1.22
  15. Upgrade

    Upgrade php to a version that resolves this vulnerability.

    Fixed in 8.2.8
  16. 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
12:00 AM
Data Sourced
12:00 AM
DescriptionAffected Software
Updated
12:00 AM
Affected Software
Aug 5, 2023
Data Sourced
04:16 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:42 AM
Data Sourced
via MITRE·05:42 AM
DescriptionSeverity
Data Sourced
via OSV·06:15 AM
DescriptionSeverityAffected Software
Aug 22, 2023
Data Sourced
08:07 PM
Weakness
Updated
08:07 PM
Severity
Aug 23, 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
Data Sourced
via Red Hat·10:39 AM
DescriptionSeverityAffected Software
Updated
10:39 AM
Severity
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 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