CVE Database›Document archive›CVE-2023-3823

CVE-2023-3823

php: XML loading external entity without being enabled

Loading…

Severity

Moderate

Red Hat Product Security

7.5

CVSS 3.1

Review impact separately from score.

Published · August 3, 2023

Updated · August 7, 2026

Description

A flaw was found in PHP due to inadequate validation of user-supplied XML input. By leveraging specially crafted XML code, a remote attacker could obtain sensitive information by viewing the contents of arbitrary files on the system or initiating requests to external systems. This issue may allow unauthorized access to sensitive data and the potential for network scanning of internal and external infrastructure.

Statement

Every application/library/server that is parsing/interacting with XML documents is affected.

CVSS score applicability

The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.

Mitigation

To avoid XML external entity attacks, either disable external entity loading if it's not necessary for your application or change the default external entity loader by using libxml_set_external_entity_loader. This can be used to suppress the expansion of arbitrary external entities. For PHP versions prior to 8.0, the following should be set when using the default PHP XML parser in order to prevent XXE:

https://www.php.net/manual/en/function.libxml-set-external-entity-loader.php

CVSS / CWE

CVSS 3.1 · 7.5
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

CWE-611 · Improper Restriction of XML External Entity Reference