If you’re dealing with PHP, and if the PHP expect module is loaded, and if XML inputs aren’t properly sanitized, then defining a SYSTEM entity with the value of expect://$COMMAND
will get you RCE via XXE.
Don’t expect to run into this often however, as this combination of factors is pretty rare.