Safely inject credentials in HTTP headers with Vercel Sandbox
Vercel Sandbox now automatically injects HTTP headers into outbound requests from sandboxed code, keeping API keys and tokens outside the sandbox VM boundary. This prevents credential exfiltration even if an agent is compromised, and is designed for AI agent workflows where prompt injection is a security threat.
can now automatically inject HTTP headers into outbound requests from sandboxed code. This keeps API keys and tokens safely outside the sandbox VM boundary, so apps running inside the sandbox can call authenticated services without ever accessing the credentials.
Header injection is configured as part of the network policy using . When the sandbox makes an HTTPS request to a matching domain, the firewall adds or replaces the specified headers before forwarding the request.Vercel Sandboxtransform
This is designed for AI agent workflows where prompt injection is a real threat. Even if an agent is compromised, there's nothing to exfiltrate, as the credentials only exist in a layer outside the VM.
Injection rules work with all egress network policy configurations, including open internet access. To allow general traffic while injecting credentials for specific services:
Like all network policy settings, injection rules can be updated on a running sandbox without restarting it. This enables multi-phase workflows, inject credentials during setup, then remove them before running untrusted code:
Available to all Pro and Enterprise customers. Learn more in the .documentation
Live updates
Key highlights
Header overwrite: Injection applies to HTTP headers on outbound requests.
Full replacement: Injected headers overwrite any existing headers with the same name set by sandbox code, preventing the sandbox from substituting its own credentials.
Domain matching: Supports exact domains and wildcards (e.g., *.github.com). Injection only triggers when the outbound request matches.
Works with all policies: Combine injection rules with , or domain-specific allow lists.
allow-all
Source: original entry ↗
More from Vercel
Follow Vercel to get its new changes in your feed and email digest.
Updates to Hobby and Pro Terms of Service
Vercel is updating Terms of Service for Hobby and Pro customers effective October 19, 2026, clarifying credit policies, managed accounts, auto-renewal practices, and adding statutory cancellation and refund rights for UK and EU consumers, including protections for service changes with negative impact.
Mercury 3 now available on AI Gateway
Inception's Mercury 3 model is now available on Vercel's AI Gateway with 50% launch pricing and generation speeds exceeding 1,000 tokens per second. The model enables parallel text refinement with a 1M-token context window, ideal for real-time applications like browser agents and customer support.
MiniMax M3.1 Flash now available on AI Gateway for free
MiniMax M3.1 Flash, an open-weight multimodal model with 1M-token context window for coding and agentic work, is now available on Vercel's AI Gateway at no cost through October 20. The model excels at complex agent tasks, coding applications, and cybersecurity work, and can be used through multiple APIs and coding agents.