Hijacking a US Treasury Subdomain for $3: The Overlooked Vulnerability

An attacker can hijack a US Treasury subdomain for $3 via a dangling CNAME, exposing a systemic asset blind spot.
The article uses a Hacker News case to show that an attacker only needs $3 to take over a US Treasury subdomain, rooted in subdomain takeover: when a CNAME record's referenced third-party resource is released but the record is not cleaned up, anyone who registers that resource can take over resolution. The harm extends beyond hosting a page to phishing with an official domain, obtaining legitimate TLS certificates, and stealing sessions via cookie scope. Government domains face greater risk due to their high trust premium, and the problem is common across large organizations. The author notes that the low attack cost highlights a disconnect in the defender's asset inventory; fixing it requires only cleaning up one record, with the real difficulty being continuous discovery and closed-loop processes. Actionable recommendations include building a subdomain inventory, performing CNAME liveness checks, and adding DNS cleanup to decommissioning processes.
A case that sparked discussion on Hacker News reveals an unsettling fact: an attacker only needs to spend $3 to take over a subdomain of the US Department of the Treasury. It sounds like a movie plot, but it points to a long-standing yet often overlooked security blind spot — subdomain takeover.

Subdomain Takeover: The Dangling DNS Pointer
To understand this attack, you first need to understand how DNS records work. When an organization configures a CNAME record in DNS for a subdomain, pointing it to a third-party service (such as a cloud hosting platform, a SaaS tool, or an abandoned project page), if the resource on the third-party side is released while the DNS record is not cleaned up in sync, a dangling pointer is formed.
At this point, anyone who registers the corresponding resource on that third-party platform can make the subdomain resolve to content they control. The problem is that from the outside, the domain still belongs to the Treasury — the browser address bar shows the official domain, and certificates may still be issued normally. The cost of the attack is therefore astonishingly low: the figure given in the original article is $3 per subdomain.
A CNAME record (Canonical Name Record) is an alias mechanism in DNS that maps one domain name to another domain name rather than directly providing an IP address. For example, blog.example.gov can be configured with a CNAME pointing to example.cloudapp.net, and during resolution the browser continues to query the latter to obtain the final IP. It is precisely this "indirect pointing" that constitutes the premise of subdomain takeover: when the referenced third-party resource (such as a cloud host, object storage bucket, or SaaS instance) is released, the CNAME still exists, and the resolution chain becomes dangling. Anyone who can recreate a resource with the same name on the other party's platform automatically "inherits" the resolution traffic brought by this CNAME.
Regarding TLS certificate issuance, CAs like Let's Encrypt verify the applicant's control over the domain through HTTP-01 or DNS-01 challenges. Once an attacker controls the resource pointed to by the hijacked subdomain, they can prove "control" through the HTTP-01 challenge (placing a specified token at the root path), thereby obtaining a legitimate certificate for that subdomain. This is the technical reason behind the original article's statement that "certificates may also be issued normally," and it is also the key reason why the browser address bar shows a lock icon and users find it difficult to detect anything unusual.
Why Government Domains Are Especially Dangerous
The harm of a hijacked subdomain goes far beyond "putting up a page." Attackers can use it to launch phishing attacks, leveraging the official domain to gain trust; they can register and obtain a TLS certificate for the subdomain so that the HTTPS lock icon displays normally; and they can exploit the cookie scope shared between the subdomain and the main domain to steal session information or deliver malicious scripts.
For government domains, the trust premium is higher and the payoff from an attack is greater. The natural trust that the public and institutions place in .gov domains makes a taken-over subdomain an extremely deceptive attack infrastructure. This problem is not unique to the Treasury but is common across large organizations — the larger the asset scale and the more legacy DNS records, the greater the exposure.
Cookie Domain Scope is key to understanding how the harm of subdomain takeover is amplified. According to RFC 6265, if a cookie's Domain attribute is set to .example.gov, the browser will send that cookie when accessing any subdomain as well. This means that an attacker-controlled evil.example.gov can not only read cookies set under its own domain but may also receive session credentials issued by the main domain or other subdomains (depending on the cookie's Domain and Path configuration). For organizations that share login state, this can lead to cross-subdomain session fixation or identity impersonation.
The Same-Origin Policy does not provide protection here: different subdomains are treated as different origins, and scripts cannot directly read each other's DOM, but the cookie Domain mechanism is a transport-layer behavior independent of the Same-Origin Policy. In addition, hijacked subdomains are often used to host malicious scripts, which are then referenced through pages on the main domain (if dynamic loading or whitelist mechanisms exist), forming a supply-chain-style injection. Together, these mechanisms explain why a seemingly peripheral subdomain can pry open the trust boundary of an entire organization.
Low-Cost Attacks Expose Systemic Gaps
The figure of $3 is the most intriguing detail in the entire case. It shows that the failure of defense lies not in the attacker having abundant resources, but in a disconnect in the defender's control over its own asset inventory. Subdomains are often configured by different teams at different times for different projects, and after a project goes offline, no one reclaims the DNS records, forming "shadow assets."
From a defensive perspective, the cost of fixing this type of problem is also extremely low — simply cleaning up a useless record. But discovering it requires continuous asset discovery: regularly enumerating subdomains, checking CNAME pointers, and verifying whether the referenced third-party resources are still valid. Automated tools can handle most of the work; the difficulty lies in whether the organization has established the corresponding processes and ownership.
Asset Discovery / Attack Surface Management is the core means of dealing with shadow assets. Common methods include: passively collecting subdomains that appear in Certificate Transparency Logs; using DNS datasets (such as SecurityTrails, Censys) for enumeration; and supplementing discovery through dictionary brute-forcing and search engine syntax (such as site:example.gov). After obtaining the inventory, the focus is on performing a "liveness check" for each CNAME — resolving the target domain and checking whether its response is empty or whether it is a cloud provider's "unregistered" placeholder page (such as AWS S3's NoSuchBucket, Azure's 404 placeholder, or GitHub Pages' unconfigured prompt). These characteristics are precisely the signals that a subdomain can be taken over.
Regarding ownership, a mature practice is to incorporate DNS records into a CMDB or IPAM system, annotate each CNAME record with an owner and associated project, and mandate a "DNS cleanup" check item in the project decommissioning approval workflow. Some organizations also enable domain ownership verification for third-party hosted resources (for example, cloud platforms require TXT record verification before binding a domain), reducing from the source the probability that a dangling pointer is taken over by others.
From a Single Case to a Methodology
The value of this case is not that "some agency had a problem again," but that it demonstrates a reusable attack pattern. Although the discussion on Hacker News is brief, it points to a mature direction in security practice: include subdomains in the scope of continuously monitored assets rather than a one-time inventory.
For operations and security teams, actionable steps include: establishing a subdomain inventory and updating it regularly; performing liveness checks on CNAME records pointing to third-party services; adding a DNS cleanup step to the project decommissioning process; and setting up ownership verification for externally hosted resources. None of these measures depend on expensive tools; they depend on closing the loop of processes.
A $3 domain exposes an organization's blind spot in understanding its own digital boundaries. Fixing it requires not budget, but awareness.
One-line Summary
An attacker can take over a US Treasury subdomain for $3 via a dangling CNAME, exposing a systemic asset blind spot.
Paragraph Summary
Starting from a case on Hacker News, the article explains that an attacker only needs $3 to take over a subdomain of the US Department of the Treasury. The root cause is subdomain takeover: when the third-party resource pointed to by a CNAME record in DNS has been released but the record has not been cleaned up, anyone who registers that resource can take over resolution. The harm goes beyond putting up a page; it also includes phishing with an official domain, obtaining legitimate TLS certificates, and stealing sessions via cookie scope. Government domains carry greater risk due to the high trust premium, and the problem is common across large organizations. The author points out that the low cost of the attack highlights the disconnect in the defender's asset inventory; fixing it requires only cleaning up one record, and the difficulty lies in continuous discovery and closed-loop processes. The article offers actionable recommendations such as building a subdomain inventory, performing CNAME liveness checks, and adding DNS cleanup to decommissioning processes.
Related articles

Vibe Coding Full-Stack in Practice: How One Person Builds a Commercial-Grade Product with AI
An analysis of the Bilibili course Vibe Coding Full-Stack in Practice: how one person uses AI to complete requirements analysis, frontend/backend development, MySQL databases, cloud deployment, multi-platform Mini Program execution, and AI-driven operations promotion—mastering one-person-company AI engineering product development.

DriveAnswer Benchmark: Evaluating Evidence Sufficiency in Autonomous Driving VLMs
DriveAnswer benchmark with 20,151 questions uses strong/weak evidence pairing to jointly evaluate answer correctness, evidence sufficiency, and visual grounding in autonomous driving VLMs, revealing zero-shot joint capability of only 21.55%.

LoomKV: Lossless KV Cache Compression Extending from GPU Memory to SSD
LoomKV proposes lossless KV cache compression using head-wise calibrated two-level 3-bit codebooks to compress BF16 high bytes, operating on both external storage and the GPU KV pool. Tier mode delivers 2.7-3.6x effective throughput near the LRU cliff; pool mode holds 1.31-1.34x more GPU tokens, bit-identical to the original tier.