AI SDK drops its built-in DNS check on Node.js: use guarded-fetch for untrusted URLs (November 12, 2026)
@ai-sdk/provider-utils 5.0.80 no longer blocks hostnames that resolve to private IPs. Pass createGuardedFetch() for untrusted URLs.
What changed
On November 12, 2026, Vercel released @ai-sdk/provider-utils@5.0.80 and @ai-sdk/mcp@2.0.98 with a note marked "Security behavior change".
provider-utils now uses the fetch you configure, or the runtime's global fetch, and no longer depends on Undici. Connection-time DNS validation on Node.js moved to an optional package, guarded-fetch.
The default URL checks still reject private IP literals, local hostnames, unsafe schemes and unsafe redirect URLs. They do not block public-looking hostnames that resolve to private addresses, or DNS rebinding.
For MCP, OAuth discovery keeps its strict DNS requirement. Because Node.js no longer has a DNS-pinned default transport, untrusted authorization-server, redirect, token and registration URLs now require an explicit custom fetch with connection-time DNS validation. The configured MCP server origin and browser window discovery remain supported.
ai@7.0.171, released the same day, adds a fetch option to createDownload.
What to do
If your server fetches URLs supplied by users, models, tools or external services, add the guarded transport on Node.js or restrict outbound traffic at the network layer. From the AI SDK docs:
npm install guarded-fetch@^0.3.0import { createFal } from '@ai-sdk/fal';
import { createGuardedFetch } from 'guarded-fetch';
import { generateImage } from 'ai';
const fetch = createGuardedFetch();
const fal = createFal({ fetch });
try {
const result = await generateImage({
model: fal.image('fal-ai/flux/schnell'),
prompt: 'A blue cat in Kyoto',
});
console.log(result.images);
} finally {
await fetch.close();
}