8.6high
Security issue with external entity loading in XML without enabling it
- Severity
- 8.6high CVSS:3.1 by php
- Exploit likelihood
- 1.34% (higher than 71% of CVEs)
- Published
- Last changed
- Assigned by
- php
- Also known as
- BIT-LIBPHP-2023-3823BIT-PHP-2023-3823BIT-PHP-MIN-2023-3823GHSA-3qrf-m4j2-pcrr
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| PHP Group PHP | from 8.0.* before 8.0.30, from 8.1.* before 8.1.22, from 8.2.* before 8.2.8 | CVE List |
| php php | from 8.0.0 before 8.0.30, from 8.1.0 before 8.1.22, from 8.2.0 before 8.2.9 | NVD |
| fedoraproject fedora | 38 | NVD |
| debian debian_linux | 10.0 | NVD |
| libphp (Bitnami) | from 8.0.0 before 8.0.30, from 8.1.0 before 8.1.22, from 8.2.0 before 8.2.9 | Bitnami Vulnerability Database |
| php (Bitnami) | from 8.0.0 before 8.0.30, from 8.1.0 before 8.1.22, from 8.2.0 before 8.2.9 | Bitnami Vulnerability Database |
| php-min (Bitnami) | from 8.0.0 before 8.0.30, from 8.1.0 before 8.1.22, from 8.2.0 before 8.2.9 | Bitnami Vulnerability Database |
All scores
| php | 8.6high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
| Bitnami Vulnerability Database | high rating |
Classification
What each source says
CVE List
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.
NVD (es)
En las versiones de PHP 8.0.* antes de la 8.0.30, 8.1.* antes de la 8.1.22, y 8.2.* antes de la 8.2.8 varias funciones XML se basan en el estado global de libxml para rastrear variables de configuración, como si las entidades externas están cargadas. Se asume que este estado no cambia a menos que el usuario lo cambie explícitamente llamando a la función apropiada. Sin embargo, dado que el estado es global del proceso, otros módulos - como ImageMagick - pueden también usar esta librería dentro del mismo proceso, y cambiar ese estado global para sus propósitos internos, y dejarlo en un estado en el que la carga de entidades externas esté habilitada. Esto puede llevar a la situación donde XML externo es analizado con entidades externas cargadas, lo que puede llevar a la divulgación de cualquier archivo local accesible a PHP. Este estado vulnerable puede persistir en el mismo proceso a través de muchas peticiones, hasta que el proceso sea cerrado.
References
| https://github.com/php/php-src/security/advisories/GHSA-3qrf-m4j2-pcrr | advisory, exploit, third-party-advisory | |
| https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7NBF77WN6DTVTY2RE73IGPYD6M4PIAWA/ | discussion, mailing-list | |
| https://security.netapp.com/advisory/ntap-20230825-0001/ | advisory, third-party-advisory | |
| https://lists.debian.org/debian-lts-announce/2023/09/msg00002.html | discussion, mailing-list | |
| https://nvd.nist.gov/vuln/detail/CVE-2023-3823 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-3823 changed 2025-02-13 | CVE Terms of Use |
| NVD | CVE-2023-3823 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-LIBPHP-2023-3823 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PHP-2023-3823 changed 2026-09-08 | Apache-2.0 |
| Bitnami Vulnerability Database | BIT-PHP-MIN-2023-3823 changed 2026-09-08 | Apache-2.0 |