Join our Newsletter — 33% off our NHI Course
Home› Glossary› Cyber Security› CNAME Takeover
Cyber Security

CNAME Takeover

← Back to Glossary
By NHI Mgmt Group Updated October 29, 2026 Domain: Cyber Security

CNAME takeover is a subdomain hijack that happens when a DNS CNAME record points to an external service that no longer claims the target name. An attacker can register or reclaim the dangling target and serve content under the trusted subdomain, which can expose users to phishing, cookie theft, or script injection.

How CNAME Takeover Works

CNAME takeover is a DNS subdomain hijack, but the weakness is not in DNS itself. It appears when a subdomain is delegated by CNAME to an external provider that no longer controls or reserves the target name, leaving a dangling trust path.

The practical issue is that the original domain owner may still publish DNS that looks legitimate, while the external destination is free for an attacker to register or reclaim. That makes the trusted subdomain capable of serving content under the victim's brand without changing the DNS record on the parent domain.

Why Dangling CNAMEs Are Dangerous

A dangling CNAME matters because browsers and users usually trust the visible parent domain, not the upstream service behind it. If an attacker claims the abandoned target, they can use the subdomain to host convincing phishing pages, inject script into a trusted origin, or harvest cookies and session data where browser scope and application design allow it.

This is especially damaging when the subdomain is used for login flows, marketing assets, file delivery, or application components that inherit trust from the parent domain. The risk is often amplified by long-lived DNS records and weak inventory hygiene, because the takeover can remain possible long after the original service was decommissioned.

How Organisations Check Exposure

Exposure review starts with an inventory of subdomains, CNAME records, and the external services they reference. Teams should compare DNS against vendor records, application ownership, and decommissioned assets to identify names that point to services no longer in use.

It is also important to check whether the target hostname is still claimed by the vendor, whether the service has been retired, and whether the subdomain is reachable from the internet. A CNAME can be harmless in a staging note and dangerous in production, so validation has to include actual resolution and content observation, not just zone-file review.

For a control-oriented baseline, NIST SP 800-53 Rev 5 Security and Privacy Controls is useful for aligning ownership, access control, and configuration review around DNS-dependent assets.

Mitigation and Detection After a Takeover

The safest fix is to remove or update the dangling CNAME so it points only to an owned and actively claimed service. If a patch cannot be applied immediately, teams should suspend the exposed subdomain, redirect it to a controlled endpoint, or otherwise eliminate the abandoned trust path before an attacker can claim it.

Detection should look for unexpected content, certificate changes, hosting changes, or redirects on subdomains that were previously tied to third-party services. After remediation, review logs and browser-facing behavior for signs of compromise, including credential capture, script injection, session abuse, or suspicious traffic from the affected origin.

For a broader control lens on this kind of exposure, NIST Cybersecurity Framework 2.0 helps organisations tie asset identification, protective controls, detection, and recovery together.

Risk and Threat Considerations

CNAME takeover is dangerous because it turns a forgotten dependency into an externally claimable trust boundary. The risk is not limited to brand damage, an attacker who controls the dangling destination can exploit the inherited origin trust to capture data or deliver malicious content under a legitimate-looking subdomain.

Failure mechanism: The organisation leaves a CNAME pointing to a third-party name or service that is no longer reserved, allowing another party to register the target and receive traffic intended for the trusted subdomain.

Impact: Users may be redirected to attacker-controlled content on a trusted origin, which can enable phishing, cookie theft, session abuse, or script-based compromise of the subdomain's trust relationship.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST CSF 2.0, CIS Controls v8 and OWASP ASVS set the technical controls, while ISO/IEC 27001:2022 defines the regulatory obligations.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0ID.AM-01 — Asset ManagementCNAME takeover depends on knowing which subdomains and delegated services exist.
PR.DS-01 — Data-at-Rest Is ProtectedCaptured subdomains can expose sensitive content and session data under a trusted origin.
DE.CM-01 — Networks and Network Services Are Monitored to Find Potentially Adverse EventsDetection of takeover relies on monitoring DNS-resolved content and unexpected service changes.
Recommendation — Inventory delegated subdomains and their external dependencies so dangling records are identified before takeover is possible. Protect exposed data paths by removing abandoned subdomain delegations before they can be abused. Monitor subdomain behaviour for unexpected content, certificate, or hosting changes that indicate takeover.
CIS Controls v8CIS-5 — Account ManagementThe control family supports ownership and lifecycle discipline for externally hosted services and their access paths.
Recommendation — Assign clear ownership for delegated subdomains and retire stale records when services are decommissioned.
ISO/IEC 27001:2022A.8.20 — Network SecurityCNAME takeover is a network-facing trust and exposure issue in DNS and service routing.
Recommendation — Review DNS-linked trust paths as part of network security management and remove abandoned external references.
OWASP ASVSV14 — Data ProtectionA compromised subdomain can expose cookies, sessions, and other data handled by the application origin.
Recommendation — Validate that subdomain trust boundaries do not allow hostile content to access protected application data.

Practitioner Guidance

What to watch for: Treat every DNS change, vendor migration, and service decommission as an ownership event, not just an infrastructure change. The key judgement is whether the external target still exists, is still owned, and still matches the intended trust boundary.

Practitioner takeaway: If a CNAME is no longer tied to an actively claimed destination, remove it or rehome it immediately, because the security issue is the dangling claim, not the DNS syntax.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on October 29, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org