Dev.to Security 🔐 Cybersecurity 👁 0 📖 1 min read

Subdomain takeover on AI-built apps: how to find dangling DNS records and fix them (proofforge.live)

A subdomain takeover happens when a DNS record on your domain still points to a service you stopped using, and someone else claims that service name. They then serve their own content on something.yourapp.com, with your

A subdomain takeover happens when a DNS record on your domain still points to a service you stopped using, and someone else claims that service name. They then serve their own content on something.yourapp.com, with your domain's trust and sometimes your cookies.

AI-built projects create these quietly. You spin up a preview on Vercel, Netlify, Heroku or a Supabase custom domain, add a CNAME like staging.yourapp.com, delete the project later, and forget the DNS record.

How to check your own domain

  1. List every DNS record in your registrar or Cloudflare. Focus on CNAME records.
  2. Open each subdomain in a browser. Look for errors like "There isn't a GitHub Pages site here", "NoSuchBucket", "No such app", or "Project not found".
  3. Any CNAME that points to a deleted project is dangling.

How to fix it

  • Delete DNS records for anything you no longer run. This is the whole fix.
  • If you still need the name, re-create the project on the service first, then verify the domain there.
  • Keep a short list of every subdomain and where it points. Review it when you delete a project.

Why cookies make it worse

If your main app sets cookies for .yourapp.com, a hijacked subdomain can read or overwrite them. Scope session cookies to the exact host and set Secure, HttpOnly and SameSite.

What an outside scan can and cannot do

A scan can resolve common subdomains and flag ones that show a "not found" page from a hosting service. It cannot know subdomains it cannot guess, so your own DNS list is the real source of truth.

Check your own app from the outside, free. Run the free ProofForge scan on your live URL. No account needed for the first scan. Full fixes from $9 one-time, 14-day money-back. Use it in your coding agent over MCP.

📰 Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.