{"dataType":"CVE_RECORD","dataVersion":"5.1","cveMetadata":{"cveId":"CVE-2023-3823","assignerOrgId":"dd77f84a-d19a-4638-8c3d-a322d820ed2b","state":"PUBLISHED","assignerShortName":"php","dateReserved":"2023-07-21T16:16:57.133Z","datePublished":"2023-08-11T05:42:25.771Z","dateUpdated":"2025-02-13T17:01:48.139Z"},"containers":{"cna":{"affected":[{"defaultStatus":"affected","product":"PHP","vendor":"PHP Group","versions":[{"lessThan":"8.0.30","status":"affected","version":"8.0.*","versionType":"semver"},{"lessThan":"8.1.22","status":"affected","version":"8.1.*","versionType":"semver"},{"lessThan":"8.2.8","status":"affected","version":"8.2.*","versionType":"semver"}]}],"credits":[{"lang":"en","type":"reporter","user":"00000000-0000-4000-9000-000000000000","value":"Joas Schilling"}],"datePublic":"2023-08-05T04:00:00.000Z","descriptions":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"<p>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&nbsp;<span style=\"background-color: rgb(255, 255, 255);\">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.&nbsp;</span></p>"}],"value":"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."}],"impacts":[{"capecId":"CAPEC-197","descriptions":[{"lang":"en","value":"CAPEC-197 XML Entity Expansion"}]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"LOW","baseScore":8.6,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"LOW","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:L","version":"3.1"},"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}]}],"providerMetadata":{"orgId":"dd77f84a-d19a-4638-8c3d-a322d820ed2b","shortName":"php","dateUpdated":"2023-09-05T22:06:18.333Z"},"references":[{"url":"https://github.com/php/php-src/security/advisories/GHSA-3qrf-m4j2-pcrr"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7NBF77WN6DTVTY2RE73IGPYD6M4PIAWA/"},{"url":"https://security.netapp.com/advisory/ntap-20230825-0001/"},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00002.html"}],"source":{"advisory":"https://github.com/php/php-src/security/advisories/GHSA-3qrf-m4j","discovery":"EXTERNAL"},"title":"Security issue with external entity loading in XML without enabling it","workarounds":[{"lang":"en","supportingMedia":[{"base64":false,"type":"text/html","value":"Disable external entity loader, e.g. like this:&nbsp;<pre>libxml_set_external_entity_loader(function () { return null; });</pre><br>"}],"value":"Disable external entity loader, e.g. like this: libxml_set_external_entity_loader(function () { return null; });"}],"x_generator":{"engine":"Vulnogram 0.1.0-dev"}},"adp":[{"providerMetadata":{"orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE","dateUpdated":"2024-08-02T07:08:50.269Z"},"title":"CVE Program Container","references":[{"url":"https://github.com/php/php-src/security/advisories/GHSA-3qrf-m4j2-pcrr","tags":["x_transferred"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7NBF77WN6DTVTY2RE73IGPYD6M4PIAWA/","tags":["x_transferred"]},{"url":"https://security.netapp.com/advisory/ntap-20230825-0001/","tags":["x_transferred"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/09/msg00002.html","tags":["x_transferred"]}]}]}}