Описание
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.
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.
Отчет
Every application/library/server that is parsing/interacting with XML documents is affected.
Меры по смягчению последствий
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
Затронутые пакеты
Платформа | Пакет | Состояние | Рекомендация | Релиз |
---|---|---|---|---|
Red Hat CodeReady Studio 12 | php | Out of support scope | ||
Red Hat Enterprise Linux 6 | php | Not affected | ||
Red Hat Enterprise Linux 7 | php | Not affected | ||
Red Hat OpenShift Dev Spaces | php | Not affected | ||
Red Hat Software Collections | rh-php73-php | Will not fix | ||
Red Hat Enterprise Linux 8 | php | Fixed | RHSA-2023:5927 | 19.10.2023 |
Red Hat Enterprise Linux 8 | php | Fixed | RHSA-2024:10952 | 11.12.2024 |
Red Hat Enterprise Linux 9 | php | Fixed | RHSA-2023:5926 | 19.10.2023 |
Red Hat Enterprise Linux 9 | php | Fixed | RHSA-2024:0387 | 24.01.2024 |
Показывать по
Ссылки на источники
Дополнительная информация
Статус:
EPSS
7.5 High
CVSS3
Связанные уязвимости
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.
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.
In PHP versions 8.0.* before 8.0.30, 8.1.* before 8.1.22, and 8.2.* be ...
Security issue with external entity loading in XML without enabling it
Уязвимость интерпретатора языка программирования PHP, связанная с неверным ограничением XML-ссылок на внешний объект, позволяющая нарушителю вызвать отказ в обслуживании или получить несанкционированный доступ к конфиденциальным данным
EPSS
7.5 High
CVSS3