Subdomain takeover : new level
The hosting provider allowed users to register without email verification and add subdomains without DNS ownership checks, enabling an attacker to create and control subdomains of other domains hosted by the provider. This could be used for phishing and, combined with a blind XSS that leaked an admin cookie, to access the administrator interface.
Published on medium.com
{{media:0}}
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This is an account of a private penetration test carried out for a hosting provider. The author does not name the company and refers to it throughout as "Hoster". The public-facing product is a hosting service website offering VDS, domains and SSL certificates, backed by a user personal account where customers register, link domains and manage their services.
The report is not about a single endpoint but about a chain of weaknesses in that account and domain-management functionality. The most interesting part, and the one the title refers to, is a subdomain takeover that goes beyond the classic case: the researcher was able to create and control a subdomain that did not previously exist, rather than only claiming an already-existing dangling one.
Setup
The work was done as a private engagement (the author describes these as "private bug bounty" projects) against one hosting provider. No tooling, versions or specific request captures are given in the report. The relevant preconditions, as described, are:
- A self-service registration flow that does not require proof of ownership of the email address used.
- A personal account area where a user can link domains and add subdomains.
- A support/helpdesk component with sequential request IDs.
- A backend that delegates DNS to CloudFlare, with the Hoster holding rights over the zones it manages.
Finding it
Several issues were found before the subdomain problem, and they matter because they set up the later chain.
- No email ownership verification at registration. The author notes it was possible to register with an address such as
[redacted], or even[redacted]. He references a known story about hacking companies through their helpdesk, but in this case disclosure of sensitive information through the support service did not happen. - IDOR on support requests. After creating a test support request, he checked neighbouring IDs of other support requests and found them accessible. This exposed who had registered with the Hoster and what problems users were facing. He calls it a usual IDOR, fixed as soon as possible.
- Stored XSS and Blind XSS. Several places had stored XSS. A blind XSS returned the service administrator cookie, which revealed where the administrator interface is located and a lot of other information: how many active users, how many domains are under control, how many VDS are deployed, payment history, and more.
- CSRF token problems. Various issues with CSRF tokens allowed dangerous actions on the user's account on the user's behalf. Where CSRF tokens were implemented, the backend did not check them. As a result some functionality was disabled entirely; for example, 2FA was temporarily removed because it was not implemented well.
In total the issue tracker reached 22 items, including implementation and functionality bugs noticed in passing.
Exploitation
Step 1: register with another project's support address
Having finished the main body of work, the author returned to the missing email verification. He thought about the connections between the hosting service owners and other projects of the same company, then registered an account using the email address of another project of that company, which he refers to as [redacted].
Step 2: link the domain and send mail as it
He managed to link the domain example.com to the account he had created. He could not control the content of the linked domain, but he could send emails on behalf of the example.com service, which he describes as a nice thing for a phishing attack.

He notes that he does not know where the reply letters went. He answered one test letter to himself and got no reply; it probably went back to the real owner of the [redacted] mailbox.
Step 3: resolve a forgotten subdomain
He then managed to resolve a forgotten subdomain, which he describes as a classic subdomain takeover vulnerability, linking to the well-known write-up on hostile subdomain takeover using Heroku, GitHub and Desk.
Step 4: add a binding to a nonexistent domain
He does not explain why, but he tried to add a binding to a nonexistent domain.

Step 5: the subdomain is created and controlled
The subdomain was successfully created and added, he could control its contents, and the content was displayed.

This is the point where the behaviour departs from the classic takeover. A classic subdomain takeover only works with subdomains that already exist. Here a new subdomain was created, which the author says should not be possible under the classic takeover model.
Step 6: no DNS proof required
He contrasts this with the usual flow, in which the provider says it will add a subdomain only if you prove you can do it, by going to DNS and adding a hash such as omnomnomtom0110 to a TXT record. In this case there was no such check. As he puts it, if you want admin.example.com, no problem.

He describes the result as a "Subdomain Takeover V2".
Root cause
The author explains the mechanism after speaking with the owners of the hosting service, who, as he puts it, opened a bit of Pandora's box.
The hosting worked through CloudFlare, and in a very particular way. In his simplified description, the Hoster tells customers to delegate their domains to it, and then forwards all incoming calls to CloudFlare, treating them as correct. If the Hoster was entrusted with a domain such as president.com, and a neighbour then created a site on notour.president.com and also gave it to the Hoster for hosting, the Hoster's server, having access to CloudFlare and already holding all rights to president.com, would add the third-level domain for the neighbour quickly and without question. All DNS information coming from CloudFlare is treated as correct, and CloudFlare trusts the Hoster.
Most hosting providers configure their own DNS services; this company transferred everything to CloudFlare from one configured user. In his description, the Hoster's server had access to CloudFlare and full rights over the parent domain, so it added the third-level domain without question. The missing email verification from Step 1 is a separate weakness, and the author links the two: the subdomain takeover worked only with addresses already controlled by the hosting service, but combined with the previously discovered admin service it could have serious consequences for both the Hoster and its clients.
Impact
The concrete effects described are:
- Sending email on behalf of another project's domain (
example.com), useful for phishing. - Creating and controlling the content of a subdomain of a domain the attacker does not own, including names such as
admin.example.com. - Through the earlier findings: reading other users' support requests via IDOR, and, via blind XSS, obtaining the service administrator cookie and learning the location of the admin interface plus user counts, domain counts, VDS counts and payment history.
The author is explicit about the limit: the subdomain takeover worked only with addresses already controlled by the hosting service. The wider risk came from combining it with the admin service found earlier.
Fix
The report states that almost all critical vulnerabilities and bugs had been fixed at the time of writing. Specifically mentioned: the IDOR was fixed as soon as possible, and some functionality was disabled entirely, with 2FA temporarily removed because it was not implemented well. The author closes by hoping nobody else will build such architectural arrangements after reading the story.
Variants to test
- Registration without email verification. Register with an address on a domain belonging to the target or a related project. A positive result is an active account that can link that domain or send mail as it.
- Domain linking without DNS proof. Try to link a domain you do not control. A positive result is the domain appearing in your account, with the ability to send mail from it even if you cannot change its content.
- Subdomain creation without a TXT challenge. Ask the provider to add a subdomain of a domain you do not own, for example
admin.example.com. A positive result is the subdomain being created and its content being served, with no hash placed in DNS. - Sequential support request IDs. Create one request and walk neighbouring IDs. A positive result is other users' tickets being readable.
- Blind XSS in support or admin-facing fields. Submit payloads that fire when staff view the entry. A positive result is an out-of-band callback carrying an administrator session cookie.
- CSRF token presence versus enforcement. Where a token is issued, replay requests without it or with a stale one. A positive result is the action succeeding on the backend.
What happened, in plain words
A security researcher was hired to test a hosting company's website. A hosting company is a business that rents out servers, domain names and security certificates to other people, a bit like a landlord who rents out flats. The researcher does not name the company, so throughout his story he calls it "Hoster".
The website had a personal account area where customers sign up, attach their domain names and manage what they rent. Over the course of the test the researcher found a whole chain of problems in that account area. The most interesting one, and the reason for the article's title, is a twist on a well-known attack called subdomain takeover. In the classic version an attacker only manages to grab a subdomain that already exists but has been left pointing at nothing. Here the researcher was able to create a brand new subdomain of a domain he did not own, and then control what it displayed. That should not be possible at all.
This article walks through the whole story from the beginning, explaining each idea as it comes up, so you can follow it even if you have never done any security work before.
The setup
The work was a private engagement, which the author describes as a "private bug bounty" project: a company pays a tester to look for weaknesses in its systems, and the findings stay private rather than being published to the world.
The report gives no tools, no software versions and no captured requests. What it does describe are the conditions that made the findings possible:
- A sign-up flow that does not require you to prove you own the email address you register with.
- A personal account area where a user can link domains and add subdomains.
- A support (helpdesk) component where each request gets a sequential number.
- A backend that hands DNS work to CloudFlare, with the Hoster holding rights over the zones it manages.
A few of those terms deserve a plain explanation before we go further.
DNS is the internet's address book. Humans type names like example.com; computers need numbers. DNS translates one into the other. It also stores small notes about a domain, such as which server handles its email.
A subdomain is a name built on top of another name. If example.com is the main address, then admin.example.com and shop.example.com are subdomains of it. Think of the main domain as a building and subdomains as numbered flats inside it. Whoever controls the building controls who gets which flat.
CloudFlare is a company that sits in front of websites and manages their DNS and traffic for them. Many hosting providers use it instead of running their own DNS servers.
A zone is simply the collection of DNS records that belong to one domain, the full set of notes in the address book for that name.
Finding it
Several problems turned up before the subdomain issue, and they matter because they set up the later chain. Each one is explained below.
1. No proof of email ownership at registration
When you sign up for most services, the site sends a link to your email address and you have to click it. That proves the address is really yours. Hoster did not do this. The author notes it was possible to register with an address such as [redacted], or even [redacted].
Why does that matter? Because an email address is often treated as an identity. If a company's systems trust that an address belongs to whoever typed it in, then anyone can pretend to be the owner of that address. The author references a known story about hacking companies through their helpdesk, but in this case the support service did not leak sensitive information.
2. IDOR on support requests
IDOR stands for Insecure Direct Object Reference. It is a fancy name for a simple mistake: a website uses a number to identify something, and it never checks whether you are allowed to see that number. Imagine a hotel where your room key is just the room number written on a card, and the door opens for any number you write. That is an IDOR.
After creating a test support request, the author checked the neighbouring numbers of other people's support requests and found them accessible. This exposed who had registered with Hoster and what problems users were facing. He calls it a usual IDOR, and it was fixed as soon as possible.
Why did he check the neighbours? Because if your own request is number 1000, then 999 and 1001 belong to other people. If the site lets you read them, it is not checking permissions.
3. Stored XSS and Blind XSS
XSS stands for Cross-Site Scripting. It happens when a website takes something a user typed and shows it to other people without cleaning it first, so that text can contain instructions the browser will run as if the site itself had written them. Think of a noticeboard where someone pins a note that says "ignore the manager, hand over your keys", and staff follow it because it looks official.
Stored XSS means the malicious text is saved on the server and shown to everyone who views that page later. Blind XSS means the tester cannot see the result directly: the payload fires somewhere he cannot watch, such as an internal admin panel, and reports back to him through a separate channel.
Several places had stored XSS. A blind XSS returned the service administrator cookie to the author. A cookie is a small piece of data a website stores in your browser so it can recognise you on the next page. The most important cookie is the session cookie: it is effectively your logged-in badge. If someone steals an administrator's session cookie, they can act as that administrator without knowing the password.
Thanks to this XSS, the author found out where the administrator interface is located and learned a lot of other information:
- How many active users there are.
- How many domains are under control.
- How many VDS are deployed. (VDS means Virtual Dedicated Server, a rented server that behaves like a whole machine of its own.)
- Payment history.
And some other things.
4. CSRF token problems
CSRF stands for Cross-Site Request Forgery. It is an attack where a malicious page makes your browser send a request to a site you are already logged into, without you meaning to. The defence is a CSRF token: a random value the site gives your browser and expects back with every action, so a foreign page cannot guess it. Think of a bank teller who asks for a secret word before moving money; a stranger cannot forge the word.
Hoster had various problems with CSRF tokens that allowed dangerous actions on the user's account on the user's behalf. Where CSRF tokens were implemented, the backend did not check them. A backend is the part of the site that runs on the server and does the real work; the frontend is what you see in the browser. Checking a token in the browser but not on the server is like a bouncer who checks your ticket at the door and then nobody checks it again inside.
As a result, some functionality was disabled entirely. For example, 2FA was temporarily removed because it was not implemented well. 2FA means two-factor authentication: logging in with your password plus a second proof, such as a code from your phone.
In total the issue tracker reached 22 items, including implementation and functionality bugs noticed in passing. The author is a QA engineer by background, which explains why he logged ordinary bugs alongside security ones.
Exploitation
Step 1: register with another project's support address
Having finished the main body of work, the author came back to the missing email verification. He started thinking about situations where it could cause maximum trouble for the hosting company and its owners. At some point he began to think about the connections between the owners of this hosting service and other projects of the same company.
After a couple of minutes he registered an account using the email address of another project of that company, which he refers to as [redacted].
Why this address? Because if the company runs several projects, an address on one project's domain may be trusted by the others. Registering with it is the first link in the chain: it gives the attacker an account that looks like it belongs to the company itself.
Step 2: link the domain and send mail as it
He managed to link the domain example.com to the account he had created. He could not control the content of the linked domain, but he could send emails on behalf of the example.com service, which he describes as a nice thing for a phishing attack.
Phishing is when an attacker sends a message that appears to come from a trusted source, to trick the recipient into handing over information or clicking something harmful. Sending mail from a real company's domain makes that deception far more convincing, because the recipient sees the genuine name.

He notes that he does not know where the reply letters went. He answered one test letter to himself and got no reply; it probably went back to the real owner of the [redacted] mailbox. He does not know where the replies went; he guesses they went to the real owner of the mailbox.
Step 3: resolve a forgotten subdomain
He then managed to resolve a forgotten subdomain, which he describes as a classic subdomain takeover vulnerability, linking to the well-known write-up on hostile subdomain takeover using Heroku, GitHub and Desk.
What is a classic subdomain takeover? Imagine a company creates shop.example.com and points it at an external service. Later the company stops using that service but forgets to remove the DNS entry. The name still points at the external provider, and the provider no longer has an owner for it. An attacker can then sign up at that provider, claim the abandoned name, and start serving their own content at shop.example.com. Visitors see the company's domain but the attacker's page. The key point is that the subdomain already existed and was dangling.
Step 4: add a binding to a nonexistent domain
He does not explain why, but he tried to add a binding to a nonexistent domain. A binding here means telling the hosting platform "this name belongs to my account".

Why try something that should fail? Because that is exactly how testers find broken validation: they ask for something that ought to be impossible and watch whether the system says no. If it says yes, the check is missing.
Step 5: the subdomain is created and controlled
The subdomain was successfully created and added, he could control its contents, and the content was displayed.

This is the point where the behaviour departs from the classic takeover. A classic subdomain takeover only works with subdomains that already exist. Here a new subdomain was created, which the author says should not be possible under the classic takeover model. In other words, the attacker did not need an abandoned flat in the building; the landlord handed him a new key to a flat in a building he did not own.
Step 6: no DNS proof required
He contrasts this with the usual flow, in which the provider says it will add a subdomain only if you prove you can do it, by going to DNS and adding a hash such as omnomnomtom0110 to a TXT record.
A TXT record is one of the note types in DNS. It holds free text, and services use it as a proof of ownership: if you can edit the DNS of a domain, you can place the value they gave you, and that proves the domain is yours. The value omnomnomtom0110 is the random string the provider would ask for in that flow.
In this case there was no such check. As he puts it, if you want admin.example.com, no problem.

He describes the result as a "Subdomain Takeover V2".
Root cause
The author explains the mechanism after speaking with the owners of the hosting service, who, as he puts it, opened a bit of Pandora's box.
The hosting worked through CloudFlare, and in a very particular way. In his simplified description, the Hoster tells customers to delegate their domains to it, and then forwards all incoming calls to CloudFlare, treating them as correct. Delegating a domain means handing over control of its DNS to someone else, the way you might give a letting agent the keys to your property.
If the Hoster was entrusted with a domain such as president.com, and a neighbour then created a site on notour.president.com and also gave it to the Hoster for hosting, the Hoster's server, having access to CloudFlare and already holding all rights to president.com, would add the third-level domain for the neighbour quickly and without question. All DNS information coming from CloudFlare is treated as correct, and CloudFlare trusts the Hoster.
Most hosting providers configure their own DNS services; this company transferred everything to CloudFlare from one configured user. In his description, the Hoster's server had access to CloudFlare and full rights over the parent domain, so it added the third-level domain without question. The missing email verification from Step 1 is a separate weakness, and the author links the two: the subdomain takeover worked only with addresses already controlled by the hosting service, but combined with the previously discovered admin service it could have serious consequences for both the Hoster and its clients.
Impact
The concrete effects described are:
- Sending email on behalf of another project's domain (
example.com), useful for phishing. - Creating and controlling the content of a subdomain of a domain the attacker does not own, including names such as
admin.example.com. - Through the earlier findings: reading other users' support requests via IDOR, and, via blind XSS, obtaining the service administrator cookie and learning the location of the admin interface plus user counts, domain counts, VDS counts and payment history.
The author is explicit about the limit: the subdomain takeover worked only with addresses already controlled by the hosting service. The wider risk came from combining it with the admin service found earlier.
Fix
The report states that almost all critical vulnerabilities and bugs had been fixed at the time of writing. Specifically mentioned: the IDOR was fixed as soon as possible, and some functionality was disabled entirely, with 2FA temporarily removed because it was not implemented well. The author closes by hoping nobody else will build such architectural arrangements after reading the story.
Variants to test
These are the checks a tester would repeat on a similar target, each with the result that would confirm the problem.
- Registration without email verification. Register with an address on a domain belonging to the target or a related project. A positive result is an active account that can link that domain or send mail as it.
- Domain linking without DNS proof. Try to link a domain you do not control. A positive result is the domain appearing in your account, with the ability to send mail from it even if you cannot change its content.
- Subdomain creation without a TXT challenge. Ask the provider to add a subdomain of a domain you do not own, for example
admin.example.com. A positive result is the subdomain being created and its content being served, with no hash placed in DNS. - Sequential support request IDs. Create one request and walk neighbouring IDs. A positive result is other users' tickets being readable.
- Blind XSS in support or admin-facing fields. Submit payloads that fire when staff view the entry. A positive result is an out-of-band callback carrying an administrator session cookie.
- CSRF token presence versus enforcement. Where a token is issued, replay requests without it or with a stale one. A positive result is the action succeeding on the backend.
Glossary
- Backend: the part of a website that runs on the server and does the real work, as opposed to the frontend you see in the browser.
- Binding: telling a hosting platform that a particular domain name belongs to your account.
- Blind XSS: a cross-site scripting attack whose result the attacker cannot see directly, because it fires in a place such as an admin panel, and reports back through a separate channel.
- CloudFlare: a company that sits in front of websites and manages their DNS and traffic.
- Cookie: a small piece of data a website stores in your browser so it can recognise you on later pages; the session cookie acts as your logged-in badge.
- CSRF (Cross-Site Request Forgery): an attack where a malicious page makes your browser send a request to a site you are logged into, without your intent.
- CSRF token: a random value the site gives your browser and expects back with every action, so a foreign page cannot forge the request.
- Delegation: handing control of a domain's DNS over to another party.
- DNS: the internet's address book, translating names like
example.cominto the numbers computers use, and storing notes about a domain. - Domain: a name on the internet, such as
example.com, that people type to reach a service. - 2FA (two-factor authentication): logging in with your password plus a second proof, such as a code from your phone.
- Hosting provider: a business that rents out servers, domain names and certificates to customers.
- IDOR (Insecure Direct Object Reference): a mistake where a site uses a number to identify something and never checks whether you are allowed to see it.
- Phishing: sending a message that appears to come from a trusted source to trick the recipient into handing over information or clicking something harmful.
- Private bug bounty: a paid security test where the findings stay private rather than being published.
- QA engineer: a person whose job is to test software for defects and functionality problems.
- Session cookie: the cookie that proves you are logged in; stealing an administrator's session cookie lets an attacker act as that administrator.
- Stored XSS: cross-site scripting where the malicious text is saved on the server and shown to everyone who later views the page.
- Subdomain: a name built on top of another name, such as
admin.example.comunderexample.com. - Subdomain takeover: claiming a subdomain that already exists but has been left pointing at an abandoned external service.
- TXT record: a DNS note that holds free text, often used as proof that you control a domain.
- VDS (Virtual Dedicated Server): a rented server that behaves like a whole machine of its own.
- Zone: the full collection of DNS records belonging to one domain.