When trying to access the script include - "hr_PortalUtil" from the global scope getting the error -
Security restricted: Execute operation on script include 'hr_PortalUtil' from scope 'Global' was denied. The application 'Global' must declare a cross scope access privilege. Please contact the application admin to update their access requests
There was an invalid sys_restricted_caller_access record that was present on the instance. It had an empty/null source type. Hence, when loading the list of all restricted caller access records to check the access privileges, it failed to load that record and threw the NullPointerException.
Deleting empty records and setting the status of the restricted caller access that related to the script include - "hr_PortalUtil" record to "Allowed" will resolve the issue