← Blog

Claude skill subdomain takeover via dangling CNAME security — SA-SKL-SUBDOM

A dangling CNAME is a DNS record that points to a hostname that no longer resolves to an owned or active deployment. If the target hostname is claimable by a third party on the same hosting platform (Vercel, Netlify, GitHub Pages, Heroku), that third party can register the deployment and begin serving content from the original subdomain — under the original domain name, with valid HTTPS from the platform's shared TLS certificate, fully trusted by browsers and users. The impact ranges from phishing under a trusted subdomain to setting domain-scoped cookies that are sent to the main application. SA-SKL-SUBDOM-001 through SUBDOM-004 cover the four most common dangling CNAME patterns found in MCP skill deployments.

By SkillAudit  |  5 Nov 2026

Why subdomain takeover is underestimated

Subdomain takeover is frequently dismissed as a low-severity informational finding because the attacker "only controls a subdomain." This underestimates the trust model. Users who see a URL on docs.skillaudit.dev treat it as controlled by SkillAudit. Browsers treat docs.skillaudit.dev as a first-party context for cookies with domain=.skillaudit.dev. Email systems treat replies-to on docs.skillaudit.dev as coming from the SkillAudit domain for SPF/DKIM purposes on some configurations. For MCP skills where users are developers — who typically open links from READMEs, changelogs, and documentation without scrutinizing the exact subdomain — a docs or help subdomain takeover is a phishing surface with an unusually high click rate and an unusually low suspicion rate.

SA-SKL-SUBDOM in scope: SUBDOM-001 (dangling CNAME to deprovisioned Vercel/Netlify), SUBDOM-002 (GitHub Pages CNAME to deleted/unpublished repo), SUBDOM-003 (Heroku CNAME to released app name), SUBDOM-004 (wildcard CNAME enabling cookie hijacking). SkillAudit's DNS audit checks all CNAME records against active deployments and flags unclaimed targets.

SUBDOM-001 — Dangling CNAME to deprovisioned Vercel or Netlify deployment

When a team deploys a docs site on Vercel or Netlify under a custom subdomain, the platform creates a deployment at a platform-assigned hostname (e.g., skillaudit-docs.vercel.app). The team adds a CNAME record: docs.skillaudit.dev CNAME skillaudit-docs.vercel.app. Later, the team migrates the docs to a different platform, removes the Vercel project, but forgets to remove the DNS CNAME record. The CNAME now points to a Vercel hostname that is no longer claimed by any project. Any Vercel user can create a new project and claim skillaudit-docs.vercel.app as its deployment URL — after which docs.skillaudit.dev resolves to their project, served with a valid TLS certificate from Vercel's shared certificate infrastructure.

# Vulnerable DNS state — docs CNAME pointing to unclaimed Vercel deployment
# Check: dig CNAME docs.skillaudit.dev
docs.skillaudit.dev.  300  IN  CNAME  skillaudit-docs.vercel.app.

# Check: curl -I https://skillaudit-docs.vercel.app
# If response is Vercel's "deployment not found" page — the name is claimable:
# HTTP/2 404
# x-vercel-id: ...
# → Any Vercel user can claim skillaudit-docs.vercel.app by creating a new project
# Detection and remediation checklist
# 1. Enumerate all CNAME records for your domain
dig CNAME docs.skillaudit.dev
dig CNAME help.skillaudit.dev
dig CNAME status.skillaudit.dev
dig CNAME api.skillaudit.dev
# (Or use: dig ANY skillaudit.dev to see all records)

# 2. For each CNAME target, verify the deployment is still active and owned:
curl -sI https://skillaudit-docs.vercel.app | grep -E "HTTP|x-vercel"
# 404 from Vercel = dangling = remove the CNAME immediately

# 3. Remove dangling CNAMEs at DNS provider:
# Spaceship DNS: delete the CNAME record for docs.skillaudit.dev
# Never leave a CNAME in place after the target deployment is removed

# 4. Future prevention: audit all CNAME targets before deprovisioning any deployment
# Keep a CNAME registry: docs/dns-cnames.md listing each CNAME and its purpose/owner
CRITICAL
SA-SKL-SUBDOM-001 — MCP skill DNS has a CNAME record for a subdomain (e.g., docs.skillaudit.dev) pointing to a Vercel, Netlify, or similar PaaS hostname that no longer has an active deployment claiming it; any attacker can create a new deployment on the same platform, claim the target hostname, and begin serving content from the original subdomain under a valid TLS certificate trusted by all browsers. Fix: audit all CNAME records against active deployments before and after any infrastructure change; delete CNAME records immediately when their target deployment is deprovisioned; maintain a DNS registry (docs/dns-cnames.md) cross-referencing each CNAME with its deployment. Detection: SkillAudit's DNS audit resolves each CNAME target and flags those returning platform-specific "deployment not found" responses (Vercel 404, Netlify "Not found", GitHub 404 on github.io).

SUBDOM-002 — GitHub Pages CNAME to deleted or unpublished repository

GitHub Pages sites are served from a repository's gh-pages branch (or /docs folder) under a <org>.github.io/<repo> hostname. When a custom subdomain CNAME points to this hostname and the repository is deleted, made private, or has its GitHub Pages configuration removed, the target hostname becomes claimable. GitHub Pages enforces domain verification for custom domains since 2022, but the verification only protects against new CNAME additions — existing CNAME records added before verification was enforced, or records added while the domain was verified and then the verification lapsed, remain dangling. An attacker who creates a repository named identically to the original can claim the GitHub Pages hostname and begin serving the original subdomain.

# Vulnerable: help subdomain CNAME pointing to deleted GitHub Pages repo
# DNS record (Spaceship or other registrar):
help.skillaudit.dev.  300  IN  CNAME  skillaudit.github.io.

# GitHub Pages hostname: skillaudit.github.io/help
# If the GitHub org no longer has a 'help' repo with Pages enabled:
curl -sI https://skillaudit.github.io/help
# HTTP/2 404 — pages not found → claimable

# Fix: before deleting any repo with a custom domain CNAME:
# 1. Remove the CNAME record from DNS first
# 2. Then delete the GitHub repo
# (Order matters: DNS record removal before repo deletion)

# GitHub domain verification prevents most new takeovers but check existing records:
# GitHub org Settings → Pages → Verified domains
# Any subdomain with a CNAME to github.io that is NOT in this list is at risk
# Audit script: check all github.io CNAME targets for active Pages sites
for sub in docs help api status blog; do
  target=$(dig +short CNAME ${sub}.skillaudit.dev)
  if [[ $target == *"github.io"* ]]; then
    response=$(curl -sI "https://${target}" | head -1)
    echo "${sub}.skillaudit.dev → ${target} → ${response}"
  fi
done
# Any line showing 404 is a dangling CNAME — remove immediately
HIGH
SA-SKL-SUBDOM-002 — MCP skill DNS has a CNAME record for a subdomain pointing to a GitHub Pages hostname (<org>.github.io) for a repository that has been deleted, made private, or has had its Pages configuration removed; an attacker can create a repository with the same name under the same GitHub organization (if the org is not protected) or under any account if the Pages site was not using an org-level custom domain; delete the DNS CNAME before deleting any GitHub repo that serves a custom subdomain. Detection: SkillAudit's DNS audit resolves CNAME targets ending in .github.io and flags those returning HTTP 404 from GitHub's Pages infrastructure.

SUBDOM-003 — Heroku CNAME to released app name

Heroku app names are globally unique within the herokuapp.com namespace. When a team registers skillaudit-api as a Heroku app, deploys to it, and adds a CNAME api.skillaudit.dev CNAME skillaudit-api.herokuapp.com, the setup is secure as long as the app exists. When the team later migrates away from Heroku and deletes the app without removing the DNS CNAME, the name skillaudit-api becomes available for any Heroku user to claim. Because Heroku app names are first-come-first-served, an attacker who monitors for newly available app names (by watching the Heroku app release announcements or by checking common name patterns) can register skillaudit-api immediately and begin receiving all API traffic — including authentication tokens, API keys, and sensitive request bodies — that clients send to api.skillaudit.dev.

# Vulnerable: API subdomain CNAME pointing to released Heroku app
# DNS record:
api.skillaudit.dev.  300  IN  CNAME  skillaudit-api.herokuapp.com.

# Verify if Heroku app still exists and is owned:
curl -sI https://skillaudit-api.herokuapp.com
# If response is Heroku's "no such app" page:
# HTTP/2 404
# x-request-id: ...
# → App name is available; any Heroku user can register it

# Check response body for Heroku's specific "no such app" marker:
curl -s https://skillaudit-api.herokuapp.com | grep -i "no such app"
# → "Heroku | No such app" title confirms dangling CNAME

# Remediation:
# 1. Remove CNAME record from DNS immediately
# 2. If the Heroku app is still needed but being migrated, keep the app registered
#    under a "placeholder" process until CNAME is removed
# 3. Add to deprovisioning checklist: DNS CNAME removal precedes app deletion
HIGH
SA-SKL-SUBDOM-003 — MCP skill DNS has a CNAME for a subdomain (commonly api, staging, or beta) pointing to a Heroku app hostname (<app-name>.herokuapp.com) for an app that has been deleted; the Heroku app name is globally available for any user to register; an attacker who claims the name receives all traffic to that subdomain, including authentication headers and request bodies from any clients that have not updated their base URL. Fix: add "remove DNS CNAME before deleting Heroku app" to the infrastructure deprovisioning checklist; Heroku also offers app-level domain verification (Heroku ACM) — verify the custom domain in the Heroku app before it is used in DNS. Detection: SkillAudit's DNS audit resolves CNAME targets ending in .herokuapp.com and flags those returning Heroku's "no such app" response.

SUBDOM-004 — Wildcard CNAME enabling cookie hijacking

A wildcard DNS record (*.skillaudit.dev CNAME hosting.example.com) is sometimes used as a convenience configuration to route all unrecognized subdomains to a catch-all hosting destination. If the CNAME target is a hosting platform where any user can claim an endpoint (a PaaS, a CDN edge, a reverse proxy service), and if the platform does not enforce domain ownership verification, then any user of that platform can claim attacker.skillaudit.dev as a target. The attacker's site at attacker.skillaudit.dev can set cookies with domain=.skillaudit.dev — which are then sent by the browser to www.skillaudit.dev, api.skillaudit.dev, and any other subdomain. This enables session fixation, CSRF token injection, and authentication state manipulation against the main application.

# Vulnerable: wildcard CNAME on the domain
# DNS record:
*.skillaudit.dev.  300  IN  CNAME  skillaudit.example-hosting.com.

# Impact: attacker registers 'attacker.skillaudit.dev' as a target on example-hosting.com
# Serves a page from attacker.skillaudit.dev that sets:
# document.cookie = "session_fixation=ATTACKER_VALUE; domain=.skillaudit.dev; path=/"
# Browser now sends this cookie to api.skillaudit.dev, www.skillaudit.dev, etc.

# Check for wildcard CNAMEs:
dig CNAME "*.skillaudit.dev"
# Any result here is a wildcard CNAME — investigate the target's ownership model

# Check if wildcard resolves (some tools):
dig CNAME xyzrandom123.skillaudit.dev
# If this resolves (same response as the wildcard) — wildcard is live
# Fix: enumerate all required subdomains and create specific records for each
# Remove wildcard CNAME entirely — no subdomain should resolve unless explicitly configured

# Before removing wildcard: list all subdomains in use (from access logs, DNS exports)
# Common subdomains for MCP skills:
# www        → A record to production VPS or CNAME to CDN
# api        → A record to API server
# docs       → CNAME to docs hosting (with platform domain verification)
# status     → CNAME to status page (e.g., betteruptime, upptime)
# blog       → Subpath of main domain (preferred) or explicit CNAME

# After listing all required subdomains, delete the wildcard and add specific records only
# Spaceship DNS: remove *.skillaudit.dev CNAME record
# Add specific CNAMEs for each required subdomain with verified platform ownership

# Monitoring: set up certificate transparency log monitoring (crt.sh)
# to detect any new TLS certificates issued for *.skillaudit.dev subdomains
HIGH
SA-SKL-SUBDOM-004 — MCP skill DNS has a wildcard CNAME record (*.skillaudit.dev CNAME <hosting-platform>) where the hosting platform allows any user to claim an endpoint under the wildcard target; an attacker who claims attacker.skillaudit.dev can serve a page that sets cookies with domain=.skillaudit.dev, which are sent by the browser to all subdomains including the main application, enabling session fixation, CSRF token injection, and cookie-based authentication attacks. Fix: remove all wildcard CNAME records; enumerate required subdomains explicitly and create specific CNAME or A records for each; never use wildcard CNAMEs on application domains. Detection: SkillAudit's DNS audit checks for wildcard CNAME records on the application domain and flags any where the CNAME target is a shared-hosting platform.

SkillAudit detection summary — SA-SKL-SUBDOM

Pattern IDSeverityWhat SkillAudit flagsFix
SUBDOM-001CRITICALCNAME targets returning Vercel/Netlify platform "deployment not found" 404 responseRemove DNS CNAME before deprovisioning platform deployment; maintain DNS registry
SUBDOM-002HIGHCNAME targets ending in .github.io returning GitHub Pages 404Remove CNAME before deleting GitHub repo; verify domain in GitHub org Pages settings
SUBDOM-003HIGHCNAME targets ending in .herokuapp.com returning Heroku "no such app" responseRemove CNAME before deleting Heroku app; use Heroku ACM domain verification
SUBDOM-004HIGHWildcard CNAME record (*.domain) where target is a shared-hosting platformRemove wildcard CNAME; create specific records per subdomain only

Related patterns: For CORS origin claim via subdomain takeover enabling cross-origin credential reads, see SA-SKL-APIVERSION (APIVERSION-004). For CSP bypass via script source on claimed subdomains, see SA-SKL-CSPVIO. For Host header injection via DNS-level forwarding, see SA-SKL-HOSTINJ.