cd /news/ai-tools/cloudinary-in-an-ai-built-app-the-ap… · home › topics › ai-tools › article
[ARTICLE · art-182074] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=· neutral

Cloudinary in an AI-built app: the API secret and the open upload preset

A developer working on ProofForge described how AI-generated apps commonly leak Cloudinary API secrets into browser bundles by confusing the server-only API key and secret with the browser-safe cloud name and unsigned upload preset. The writeup recommends searching built JavaScript for the secret, avoiding public-prefixed environment variables, tightening upload presets with format, size and folder limits, signing uploads server-side, and rotating any leaked key. ProofForge's free scan checks public assets for exposed keys and tokens but cannot inspect preset configuration, so the developer notes that check must be done manually in the dashboard.

recommendation

Search your built JavaScript for the Cloudinary API secret and rotate it if found, then move signing to the server and restrict the unsigned preset's formats, size and folder with overwriting off.

more in playbook: Securing agents and AI tools
by read2 min views1 publishedDec 4, 2026

Profile photos, product images and file attachments are easy to add to an AI-built app. Cloudinary is a common pick, and the code the AI writes often mixes two very different kinds of credential. Mixing them up is how a stranger ends up with write access to your media library.

#

Two things Cloudinary gives you

Cloud name and unsigned upload preset. These are meant for the browser. A preset is a saved set of rules for uploads: folder, allowed formats, size limits. #

API key and API secret. The secret signs requests. It can upload, overwrite and delete anything in the account. It belongs on a server only.

The usual slip: the AI wants uploads to "just work", so it puts the API secret in a front-end file or in a variable that the build tool exposes to the browser. Anyone who opens the site can read it.

A second, quieter problem is an unsigned preset with no limits. If the preset allows any file type, any size and any folder, a visitor can use your account as free storage, or overwrite assets with the same name.

#

What to check

Search your built JavaScript for the API secret. Open the live site, look through the bundle files, and search for the cloud name. See what sits next to it. Anything that looks like a secret should not be there. 2. Check your env variable names. Variables with a public prefix in your framework are shipped to the browser. The secret must not use one. 3. Tighten the upload preset. Set allowed formats, a maximum file size and a fixed folder. Turn off overwriting. 4. Sign uploads on the server where you can. The browser asks your backend for a signature, then uploads. The secret never leaves the server. 5. Rotate after a leak. Deleting the key from the code does not help once it was served. Regenerate the secret in the dashboard and update the server. 6. Review what is public. Uploaded images are served from public URLs by default. If a file is private, use an authenticated or private delivery type.

#

What an outside scan can tell you

I work on ProofForge. The free scan checks the public side of a URL you own or have permission to test: browser bundle, public files, headers and supported backend signals. It never signs in. It looks for private keys and tokens sitting in your JavaScript. It cannot see how your Cloudinary preset is configured, so that check is yours to do in the dashboard. A clean result means nothing was found in the public assets checked, not that the app is secure.

── more in #ai-tools 4 stories · sorted by recency
── more on @cloudinary 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/cloudinary-in-an-ai-…] indexed:0 read:2min 2026-12-04 · —