An issue exists in Joomla! 4.0.0. The media manager does not correctly check the user's permissions before executing a file deletion command.
joomla joomla\\! 4.0.0