The issue arises from an improper authorization check on the `protectMediaLibrary` function, allowing unauthenticated attackers to access password-protected files. This enables unauthorized data access, specifically permitting attackers to download files that should be restricted.