Skip to content
Heist/ feed
Back to feed
High

Security issue with external entity loading in XML without enabling it

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2023-3823
Confirmed fixed CVEs
Not specified
Updated in this feed
4 Nov 2026, 16:26 UTC · Revision 1

Source evidence

Security issue with external entity loading in XML without enabling it

core-osv · Original source

Published 11 Aug 2023, 05:42 UTC

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.

osv:CVE-2023-3823
Complete source record
{
  "id": "19f091c1752106d339cb40d96145466068ba3ce9c23984ad1e5cfc0ca4f5552e",
  "url": "https://osv.dev/vulnerability/CVE-2023-3823",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Security issue with external entity loading in XML without enabling it",
    "summary": "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.",
    "evidence": "osv:CVE-2023-3823",
    "products": [],
    "severity": "high",
    "structured": {
      "id": "CVE-2023-3823",
      "aliases": [
        "BIT-libphp-2023-3823",
        "BIT-php-2023-3823",
        "BIT-php-min-2023-3823",
        "CVE-2023-3823",
        "GHSA-3qrf-m4j2-pcrr"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/php/php-src",
              "type": "GIT",
              "events": [
                {
                  "introduced": "5dc92c2117cafc61daaaaa240fd46c3ac33872a4"
                },
                {
                  "fixed": "8213daa932be1c2ae04726233e4e56e5df63980e"
                },
                {
                  "introduced": "381ba9f5d0edd0c9c8ec1dea7e21d513ad08b115"
                },
                {
                  "fixed": "5ffbd1ad43d2a98cd1fd91e2b20672fac30cd4c0"
                },
                {
                  "introduced": "70ee6c20ad97e02c2b8098aeea96fefbbc3ac5c2"
                },
                {
                  "fixed": "3d832da8f53d2c2f93d4ffbd1c807d9a5d66536b"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.0.0"
                      },
                      {
                        "fixed": "8.0.30"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.1.0"
                      },
                      {
                        "fixed": "8.1.22"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "cpe": "cpe:2.3:a:php:php:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "8.2.0"
                      },
                      {
                        "fixed": "8.2.9"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2023-3823.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:37.657052082Z",
      "provider": "osv",
      "references": [
        "https://lists.debian.org/debian-lts-announce/2023/09/msg00002.html",
        "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7NBF77WN6DTVTY2RE73IGPYD6M4PIAWA/",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/3xxx/CVE-2023-3823.json",
        "https://github.com/php/php-src/security/advisories/GHSA-3qrf-m4j2-pcrr",
        "https://nvd.nist.gov/vuln/detail/CVE-2023-3823",
        "https://security.netapp.com/advisory/ntap-20230825-0001/"
      ],
      "provider_metadata": {
        "cna_assigner": "php",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/3xxx/CVE-2023-3823.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2023-3823",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 504680,
  "published_at": "2023-08-11T05:42:25.771+00:00"
}