Subdomain Takeover: Identifying & Remediating Dangling CNAMEs
Subdomain Takeover: Resolving Dangling CNAME Records
A Subdomain Takeover is a security vulnerability that occurs when a subdomain (e.g. test.startup.com) points to an external service provider (like GitHub Pages, Zendesk, or AWS S3) that has been decommissioned or deleted, but the DNS CNAME record remains active.
How Takeovers Occur
An attacker discovers a CNAME record pointing to a deleted S3 bucket:
sub.startup.com CNAME startup-bucket.s3.amazonaws.com
Because the bucket is deleted, the attacker registers a new AWS S3 bucket named startup-bucket in their own account. The domain sub.startup.com now renders the attacker's bucket content directly, allowing them to host phishing pages or steal session cookies.
Mitigation & Auditing
- Audit CNAME records regularly: Scan all DNS configurations monthly using tools like Subfinder or Amass to detect dangling pointers.
- Delete CNAME records immediately: When deprecating SaaS services or deleting cloud resources, delete the corresponding CNAME record from your DNS registrar before deleting the resource.
External Perimeter & DNS Security Testing
Dangling DNS records and misconfigured cloud assets can compromise your primary domain reputation. To map all internet-facing assets and subdomains, explore our Network Penetration Testing and Web Application VAPT services, or schedule a confidential Free Security Review.
Need this tested on your own application? See our Web Application VAPT or get a fixed-price quote in 24h.
Related Security Research & Guides
PCI-DSS Compliance: Validating Network Segmentation Boundaries
Network segmentation reduces the scope of PCI-DSS audits. Learn how to validate boundaries and secure payment systems.
SQL Injection Prevention: Prepared Statements vs. Modern ORMs
SQL Injection is a classic threat. Review why raw string concatenation triggers vulnerabilities and how to utilize ORMs securely.
GraphQL Security: Hardening Endpoints against Query Depth Exploits
GraphQL queries allow clients to request nested objects. Learn how to block denial-of-service attacks using query depth limits.
Get Practical API Security Playbooks in Your Inbox
Short, developer-focused security analyses on BOLA, authorization logic, and cloud IAM boundaries. Unsubscribe anytime.
Ready to Identify & Fix Vulnerabilities in Your Platform?
Schedule a confidential 30-minute scoping review with our lead security architects under mutual NDA. We evaluate your APIs, business logic, and enterprise readiness.