{
  "threat_severity" : "Moderate",
  "public_date" : "2023-08-03T00:00:00Z",
  "bugzilla" : {
    "description" : "php: XML loading external entity without being enabled",
    "id" : "2229396",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=2229396"
  },
  "cvss3" : {
    "cvss3_base_score" : "7.5",
    "cvss3_scoring_vector" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
    "status" : "verified"
  },
  "cwe" : "CWE-611",
  "details" : [ "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." ],
  "statement" : "Every application/library/server that is parsing/interacting with XML documents is affected.",
  "affected_release" : [ {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2023-10-19T00:00:00Z",
    "advisory" : "RHSA-2023:5927",
    "cpe" : "cpe:/a:redhat:enterprise_linux:8",
    "package" : "php:8.0-8080020231006102311.0b4eb31d"
  }, {
    "product_name" : "Red Hat Enterprise Linux 8",
    "release_date" : "2024-12-11T00:00:00Z",
    "advisory" : "RHSA-2024:10952",
    "cpe" : "cpe:/a:redhat:enterprise_linux:8",
    "package" : "php:7.4-8100020241113075828.f7998665"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2023-10-19T00:00:00Z",
    "advisory" : "RHSA-2023:5926",
    "cpe" : "cpe:/a:redhat:enterprise_linux:9",
    "package" : "php-0:8.0.30-1.el9_2"
  }, {
    "product_name" : "Red Hat Enterprise Linux 9",
    "release_date" : "2024-01-24T00:00:00Z",
    "advisory" : "RHSA-2024:0387",
    "cpe" : "cpe:/a:redhat:enterprise_linux:9",
    "package" : "php:8.1-9030020231221080340.9"
  } ],
  "package_state" : [ {
    "product_name" : "Red Hat Enterprise Linux 6",
    "fix_state" : "Not affected",
    "package_name" : "php",
    "cpe" : "cpe:/o:redhat:enterprise_linux:6"
  }, {
    "product_name" : "Red Hat Enterprise Linux 7",
    "fix_state" : "Not affected",
    "package_name" : "php",
    "cpe" : "cpe:/o:redhat:enterprise_linux:7"
  }, {
    "product_name" : "Red Hat OpenShift Dev Spaces",
    "fix_state" : "Not affected",
    "package_name" : "php",
    "cpe" : "cpe:/a:redhat:openshift_devspaces:3"
  }, {
    "product_name" : "Red Hat Software Collections",
    "fix_state" : "Will not fix",
    "package_name" : "rh-php73-php",
    "cpe" : "cpe:/a:redhat:rhel_software_collections:3"
  } ],
  "references" : [ "https://www.cve.org/CVERecord?id=CVE-2023-3823\nhttps://nvd.nist.gov/vuln/detail/CVE-2023-3823\nhttps://github.com/php/php-src/commit/c283c3ab0ba45d21b2b8745c1f9c7cbfe771c975\nhttps://github.com/php/php-src/security/advisories/GHSA-3qrf-m4j2-pcrr\nhttps://www.php.net/ChangeLog-8.php#8.0.30" ],
  "name" : "CVE-2023-3823",
  "mitigation" : {
    "value" : "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:\nhttps://www.php.net/manual/en/function.libxml-set-external-entity-loader.php",
    "lang" : "en:us"
  },
  "csaw" : false
}