Subdomain takeover at api.legalrobot.com due to non-used domain in Modulus.io.
A subdomain of legalrobot.com pointed to the Modulus.io hosting service but had no application configured there. An attacker could claim the subdomain by registering it on Modulus.io, allowing them to serve content under the legitimate domain.
Originally disclosed on HackerOne
- Fixed in 26 days
- Paid in 26 days
- Disclosed after 56 days
Hi,
I noticed that the following domain: api.legalrobot.com was returning the following information:
NO APPLICATION WAS FOUND FOR
api.legalrobot.com

from Modulus.io. The problem with this is that this tends to be pretty bad depending on the service you use.
In this case, what I did was to create a new account on Modulus, and saw the following setup when I created my own application:

I tried adding the specific domain, but it said it was already added somewhere. The problem was that I then tried with the wildcard: *.legalrobot.com, and that actually worked:

Which also made the page resolve my app:

You should not point subdomains to services you do not use (yet). Since I have claimed the wildcard *.legalrobot.com now (just for PoC of course), let me know if I should remove this, so you could claim the wildcard yourself, which would probably prevent you completely from risking that subdomains will be taken over.
PoC-link:
https://api.legalrobot.com/
I've just made a simple Hello World! but look in the HTML-source for a reference to me:
$ curl https://api.legalrobot.com
Hello World!<!--FRANS ROSEN-->
Also, please note that Modulus will actually resolve the domain serving SSL, which is a really bad thing.
You should remove the DNS post, or let me know if I should remove the wildcard-domain so you could claim it in this service. Let me know if you need additional information.
Also, we'll add this into the scanner during next week since we've seen a couple of clients being affected by this. You do not need to reward me anything as you could see this as a form of premium service or whatnot.. :)
Regards, Frans
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the DNS record for api.legalrobot.com pointed to Modulus.io, but no application was configured for that subdomain on Modulus, allowing anyone to claim it.
Impact
An attacker could serve their own content on api.legalrobot.com.
What the attacker needed
A free Modulus.io account; the target subdomain points to Modulus.io
The fix
The DNS record pointing to Modulus.io should be removed, or the wildcard domain should be claimed by the legitimate owner to prevent takeover.
How it was found
- Visit api.legalrobot.com and observe the message that no application was found.
- Create a new account on Modulus.io and set up an application.
- Try to add the specific subdomain api.legalrobot.com, which fails because it is already added.
- Add the wildcard domain *.legalrobot.com, which succeeds.
- Verify that api.legalrobot.com now resolves to the attacker's application.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When a website uses a hosting service, it often points a subdomain (like api.example.com) to that service. If the service no longer has an application for that subdomain, anyone who signs up for the same hosting service can claim that subdomain and put their own content there. This is called a subdomain takeover, and it can let an attacker impersonate the real site.
What is Subdomain takeover?
A company's DNS still points at a cloud service it no longer uses, so anyone can claim it and serve content on the company's domain.