CVE-2023-3823

Public Exploit
Security issue with external entity loading in XML without enabling it

Description

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.

Remediation

Workaround:

  • Disable external entity loader, e.g. like this: libxml_set_external_entity_loader(function () { return null; });

Category

8.6
CVSS
Severity: High
CVSS 3.1 •
EPSS 0.14%
Third-Party Advisory github.com Third-Party Advisory netapp.com
Affected: PHP Group PHP
Published at:
Updated at:

References

Frequently Asked Questions

What is the severity of CVE-2023-3823?
CVE-2023-3823 has been scored as a high severity vulnerability.
How to fix CVE-2023-3823?
As a workaround for remediating CVE-2023-3823: Disable external entity loader, e.g. like this: libxml_set_external_entity_loader(function () { return null; });
Is CVE-2023-3823 being actively exploited in the wild?
It is possible that CVE-2023-3823 is being exploited or will be exploited in a near future based on public information. According to its EPSS score, there is a ~0% probability that this vulnerability will be exploited by malicious actors in the next 30 days.
What software or system is affected by CVE-2023-3823?
CVE-2023-3823 affects PHP Group PHP.
This platform uses data from the NIST NVD, MITRE CVE, MITRE CWE, First.org and CISA KEV but is not endorsed or certified by these entities. CVE is a registred trademark of the MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. CWE is a registred trademark of the MITRE Corporation and the authoritative source of CWE content is MITRE's CWE web site.
© 2025 Under My Watch. All Rights Reserved.