How I Found and Exploited Exposed Cloudinary API Keys to Take Over a Cloud Storage
An API endpoint exposed Cloudinary API credentials, allowing an attacker to validate them and then upload and delete files in the associated cloud storage. The exposed keys also led to files being publicly accessible via direct URLs.
Published on medium.com
It looks a bit strange, doesn’t it, but that’s how it is (the important thing is to always check for suspicious things in the Fetch you find)
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, an API endpoint returned Cloudinary API credentials in its response without proper access control, and the associated Cloudinary account had weak role restrictions.
Impact
An attacker could upload and delete files in the Cloudinary account, and some files could be publicly accessed via direct URLs.
What the attacker needed
Access to the web application; ability to inspect network requests
How it was found
- Open browser developer tools, go to the Network tab, and filter for Fetch/XHR requests.
- Find a request to an API endpoint that returns Cloudinary credentials.
- Use curl with the exposed API key and secret to list resources and confirm they are valid.
- Upload a harmless text file using curl to prove write access.
- Access the uploaded file's URL to confirm it is publicly accessible.
- Delete the uploaded file using curl to clean up.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A website was accidentally sharing the username and password (API keys) for its Cloudinary account, a service that stores images and files. Anyone who found these keys could use them to add or remove files in that account, and some files could be viewed by anyone with the link.
What is Leaked secrets?
Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.