PHP-050 / Advanced
Allowing XML external entity parsing (XXE)
Why is this a problem?
Reading file:///etc/passwd and SSRF are possible.
How to fix it
php
libxml_set_external_entity_loader(fn() => null); // PHP 8.x disables external entities by default; explicit configuration is recommended
$xml = simplexml_load_string($request->getContent(), 'SimpleXMLElement', LIBXML_NONET);