handleUpload() in src/gql/resolvers/mutations/Assets.php contains the code that processes the save_images_Asset mutation.
It has some basic validation logic for the url parameter (source of the image) and filename parameter (what to save image as):
} elseif (!empty($fileInformation['url'])) {
$url = $fileInformation['url'];
// make sure the hostname is alphanumeric and not an IP address
$hostname = parse_url($url, PHP_URL_HOST);
if (
!filter_var($hostname, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME) ||
filter_var($hostname, FILTER_VALIDATE_IP)
) {
throw new UserError("$url contains an invalid hostname.");
}
if (empty($fileInformation['filename'])) {
$filename = AssetsHelper::prepareAssetName(pathinfo(UrlHelper::stripQueryString($url), PATHINFO_BASENAME));
} else {
$filename = AssetsHelper::prepareAssetName($fileInformation['filename']);
}
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
if (is_array($allowedExtensions) && !in_array($extension, $allowedExtensions,...
4.16.185.8.22Exploitability
AV:NAC:LAT:NPR:LUI:NVulnerable System
VC:LVI:NVA:NSubsequent System
SC:NSI:NSA:N5.3/CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N