Security
Vercel Blob is available on all plans
Those with the owner, member, developer role can access this feature
For files that require authentication, use private storage. Private Blob stores require authentication for all read and write operations. When your code runs on Vercel, the SDK uses OpenID Connect (OIDC) by default. OIDC is preferred over the long-lived BLOB_READ_WRITE_TOKEN because its tokens rotate automatically. Use BLOB_READ_WRITE_TOKEN when code runs outside Vercel or for client uploads. Files in private Blob stores cannot be accessed via public URLs. You deliver them to your users through Vercel Functions where you implement your own authentication logic.
Projects connected to a store with only BLOB_READ_WRITE_TOKEN authenticate with a static token. A read-write token never expires, so if it leaks through a .env.local file, CI logs, or a shared secret, anyone who has it can read and write your store until you rotate it. OIDC replaces it with short-lived tokens that Vercel issues and rotates automatically, so there is no long-lived secret to leak.
On your store's Projects tab, connections that still use the read-write token show an Enable OIDC Recommended badge next to BLOB_READ_WRITE_TOKEN. The migration has two steps: upgrade each connected project to OIDC, then revoke the read-write token once no code depends on it.
- Update
@vercel/blobto2.4.0or later in the project. For Python, see Authentication in the Python SDK reference. - Open your Blob store in the dashboard and select the Projects tab.
- On the project's row, select the Enable OIDC Recommended badge, or open the row's menu and select Upgrade to OIDC.
- Check the detected SDK version and select Upgrade. Vercel adds
BLOB_STORE_IDandBLOB_WEBHOOK_PUBLIC_KEYto the project.BLOB_READ_WRITE_TOKENstays in place, so nothing breaks yet. - Redeploy the project. Existing deployments keep using the read-write token until you redeploy.
- For local development, run
vercel env pullto addBLOB_STORE_IDandVERCEL_OIDC_TOKENto.env.local.
If the dashboard doesn't find @vercel/blob 2.4.0 or later in the project's dependencies, it shows a warning instead. Update the SDK, redeploy, and try again. If you've confirmed the project uses an SDK version that supports OIDC, select Upgrade Anyway.
You don't need to change code that calls the SDK without a token option. The SDK uses OIDC whenever BLOB_STORE_ID and the OIDC token are present. Code that passes token: process.env.BLOB_READ_WRITE_TOKEN explicitly keeps using the read-write token, because an explicit token always wins over OIDC. Remove the option before you revoke the token. See the credential resolution order.
If the connection uses a custom environment variable prefix, the new variables use that prefix too, such as MY_PREFIX_STORE_ID. The SDK only reads BLOB_STORE_ID automatically, so replace token: process.env.MY_PREFIX_READ_WRITE_TOKEN with storeId: process.env.MY_PREFIX_STORE_ID in each SDK call.
When every connected project uses OIDC, the Projects tab shows a banner that recommends revoking the read-write token. Before you revoke it, redeploy each project and confirm that nothing outside Vercel, such as a CI job or another host, still uses the token.
- On the store's Projects tab, select Revoke Token in the banner.
- Select Revoke Token to confirm.
Revoking removes BLOB_READ_WRITE_TOKEN from every connected project.
To undo a revoke, open the store's Settings tab and select Restore Token under Restore Read-Write Token. Vercel reactivates the token and adds BLOB_READ_WRITE_TOKEN back to projects that have BLOB_STORE_ID.
Vercel Blob URLs, although publicly accessible, are unique and hard to guess when you add a random suffix to the pathname at upload time. They consist of a unique store id, a pathname, and a unique random blob id generated when the blob is created.
Headers that enhance security by preventing unauthorized downloads, blocking a blob from loading external content, and protecting against malicious file type manipulation, are enforced on each blob. They are:
content-security-policy:default-src 'none'; media-src 'self'; style-src 'unsafe-inline'; img-src 'self'x-content-type-options:nosniffcontent-disposition:inline; filename="filename.extension"orattachment; filename="filename.extension"
All files stored on Vercel Blob are secured using AES-256 encryption. This encryption process is applied at rest and is transparent, ensuring that files are encrypted before being saved to the disk and decrypted upon retrieval.
Vercel Blob is protected by Vercel's platform-wide firewall which provides DDoS mitigation and blocks abnormal or suspicious levels of incoming requests.
You can also protect a store with your own Vercel WAF rules, such as custom rules, IP blocking, and rate limiting. To enable it:
- Open your Blob store in the dashboard and select the Settings tab.
- In the Firewall section, select Protect your store, then Enable firewall.
This connects your store to vercel-blob-default-project, a Vercel-managed project that holds the firewall rules for your team's Blob stores. The project is team-wide, so other stores that enable firewall protection reuse it and share its rules. After enabling, Vercel redirects you to the project's firewall page where you create your rules. To update them later, return to the store's Settings tab and select Configure firewall.
The OWASP core ruleset is not supported for Blob stores.
Was this helpful?