The vulnerability lies in the s3-storage-manager.ts file within the S3ApiService class. Both the getPOST and getPUT methods, which handle storage operations like listing, deleting, and uploading files, perform an authorization check using an isAuthorized function. This function is asynchronous, returning a Promise<boolean>. The vulnerability was introduced because the calls to isAuthorized were not awaited. In JavaScript, a Promise object is always truthy, so the negation !isAuthorized(...) always resulted in false, causing the authorization check to be completely bypassed. As a result, any user who is authenticated, even with the lowest privileges (e.g., 'visitor'), could perform administrative actions on the S3 storage bucket. The fix was to add the await keyword to the isAuthorized calls in both the getPOST and getPUT method handlers, ensuring that the code waits for the promise to resolve to a boolean value before evaluating the authorization status.