Join our Newsletter — 33% off our NHI Course
Home› FAQ› Cyber Security› What attacks target DNS CNAME records?
Cyber Security

What attacks target DNS CNAME records?

← Back to all FAQ
By NHI Mgmt Group Editorial Team Updated October 18, 2026 Domain: Cyber Security

DNS CNAME records are targeted through subdomain takeovers, cache poisoning, and abuse of dangling aliases that point to unused external services. Defenders should inventory every alias, confirm the destination still exists, and watch for unexpected changes or orphaned records. Removing stale CNAMEs closes a common route to traffic hijacking and impersonation.

How DNS CNAME records get targeted

CNAME records are attractive because they are meant to point one name at another name, which makes them easy to abuse when the target is forgotten, repurposed, or never fully retired. The common attack paths are subdomain takeover, cache poisoning, and dangling-alias abuse, all of which exploit trust in an alias that still exists in DNS even after the underlying service no longer does.

When a CNAME points to an external service that has been deleted, moved, or left unclaimed, an attacker may be able to register the abandoned destination and inherit traffic meant for your domain. That can turn a harmless-looking alias into a redirect for phishing, impersonation, or traffic interception, especially when the subdomain is still linked from applications, emails, or public documentation.

Caching problems create a different risk. If a resolver or intermediary is induced to store a false answer, users may be sent to the wrong destination even though the zone file has not changed. The practical issue for defenders is that dns records can look correct at rest while still resolving to an attacker-controlled endpoint in the path.

For a DNS hygiene baseline, use IANA as the reference point for how DNS names and protocol registries are governed, then validate that every alias in your zone still resolves to an intentional live service. The key question is not whether the record exists, but whether the target is owned, monitored, and expected.

What makes dangling CNAMEs so useful to attackers?

The value of a dangling CNAME is that it preserves trust in the original hostname while silently removing the control behind it. Many organisations remove the application, CDN, storage bucket, or hosted endpoint but leave the alias in place, which creates a stale path that still attracts users and automated clients.

That makes the record useful for both opportunistic and targeted abuse. An attacker who can claim the abandoned destination can receive traffic, host convincing content, or stage a lookalike service without changing the visible hostname that users trust. If the alias sits on a high-value brand or login path, the impact can extend beyond simple redirection into credential capture and session abuse.

This is why subdomain takeover is not just a hosting hygiene issue. It is an exposure problem created by the gap between DNS ownership and service ownership, and it gets worse when teams treat DNS records as static infrastructure instead of living dependencies.

How defenders should validate and retire CNAMEs

A useful control is to inventory every CNAME, resolve it periodically, and confirm that the target still exists and is still owned by the right team. Records tied to ephemeral infrastructure, SaaS products, or temporary project environments deserve the most attention because they are the most likely to outlive the service they were created for.

When a destination is no longer needed, remove the alias rather than leaving it to age out naturally. If the destination must remain, confirm ownership, verify the service is still provisioned, and make sure monitoring will alert on changes to the target, not just to the zone file.

Defensive DNS controls work best when they are paired with monitoring for orphaned names, unexpected resolution changes, and external dependencies that can disappear without notice. The goal is to keep the alias aligned with a real, owned, and observed service throughout its full lifecycle.

For operational hardening, the DNS Security Guide is the most direct internal reference for subdomain takeover, dangling DNS, cache poisoning, DNS logging, and related defensive controls. It is also a useful reminder that CNAME review belongs in routine DNS hygiene, not only in incident response.

Risk and Threat Considerations

Stale CNAMEs create a persistent attack surface because they preserve a trusted name after the intended destination has gone. The result is traffic hijacking potential, brand impersonation, and in some cases access to sensitive flows that were never meant to traverse an attacker-controlled service.

Failure mechanism: The organisation removes or abandons the destination behind the alias, but the DNS record remains active, allowing an attacker to claim the orphaned target or poison resolution paths and receive trusted traffic.

Impact: Users can be redirected to malicious infrastructure, exposed to phishing or content spoofing, or sent into a chain that compromises credentials, sessions, or trust in the original domain.

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 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST CSF 2.0ID.AM-01 — Inventory of AssetsCNAME review depends on knowing which DNS aliases and dependencies exist.
PR.DS-09 — Protective TechnologyDNS protections and monitoring reduce hijack and poisoning exposure.
DE.CM-01 — Monitor Networks and Network ServicesUnexpected DNS target changes are a network-service monitoring concern.
Recommendation — Inventory DNS aliases and dependencies so stale CNAMEs can be found and retired. Apply DNS protection and monitoring controls to detect or block suspicious resolution changes. Monitor DNS resolution and alert on orphaned or unexpected alias changes.
NIST SP 800-53 Rev 5CM-8 — System Component InventoryStale CNAMEs are configuration dependencies that need inventory and ownership.
AU-12 — Audit Record GenerationDNS logging supports detection of unexpected alias changes and abuse.
Recommendation — Maintain an inventory of DNS aliases and remove records tied to retired services. Enable DNS logging so unexpected alias changes and suspicious lookups are auditable.

Practitioner Guidance

What to verify: Treat every CNAME as a dependency that must be owned end to end. Verify the destination still resolves to a live service, is tied to an accountable owner, and is still needed by a current application or business process.

Common mistake: Teams often delete the service first and the alias later, or never revisit temporary records created for migrations, testing, or third-party integrations. That is the point where takeover risk appears.

What good looks like: You have an authoritative inventory of aliases, a review process for stale records, and monitoring that flags orphaned destinations or unexpected target changes before users do.

Practitioner takeaway: The safest CNAME is not merely syntactically correct, it is one whose destination is continuously owned, intentionally reachable, and removed as soon as that ownership ends.

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 18, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org