Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subdomains pointing to vercel.com are vulnerable #183

Closed
ScrubsAndStats opened this issue Dec 7, 2020 · 33 comments
Closed

Subdomains pointing to vercel.com are vulnerable #183

ScrubsAndStats opened this issue Dec 7, 2020 · 33 comments
Labels
edge case An edge case was discovered where it is possible to hijack a subdomain on this service.

Comments

@ScrubsAndStats
Copy link

ScrubsAndStats commented Dec 7, 2020

Service name

Vercel

Proof

Successful subdomain takeover on a harvard.edu subdomain (screenshot).
proof-vercel

Documentation

  • Create a new repository on Github and upload an index.html
  • Visit https://vercel.com/ and sign up using your Github account
  • Create a new project and point it to the previously created Github repository
  • Open the "Domains" tab on Vercel and add the vulnerable domain
  • Boom! Exploited!
@marcelo321
Copy link

Can you share the cname regex and the fingerprint?

@ScrubsAndStats
Copy link
Author

Can you share the cname regex and the fingerprint?

Sure

{ "service": "vercel", "cname": [ "" ], "fingerprint": [ "The deployment could not be found on Vercel." ], "nxdomain": false }

@adityathebe
Copy link

There are definitely edge cases here.

$ host -t CNAME anythingrandom.console.dev.twilio.com
anythingrandom.console.dev.twilio.com is an alias for cname.vercel-dns.com.
$ curl 'https://anythingrandom.console.dev.twilio.com/'                                                                                                     10:12:48
The deployment could not be found on Vercel.

DEPLOYMENT_NOT_FOUND

image

@marcelo321
Copy link

so the cname we need to grep is vercel-dns.com not vercel.com. thank you @adityathebe

@EdOverflow EdOverflow added the edge case An edge case was discovered where it is possible to hijack a subdomain on this service. label Feb 3, 2021
@blackcodersec
Copy link

Can you share the cname regex and the fingerprint?

Sure

{ "service": "vercel", "cname": [ "" ], "fingerprint": [ "The deployment could not be found on Vercel." ], "nxdomain": false }

are you takeover any subdomain? Do you have any poc?

@raladev
Copy link

raladev commented Sep 24, 2021

Summary for 2021:
U can takeover mashed.potato.com only if potato.com is not used in the account of the victim, otherwise, u will get Already owned err.

@dark-ninja10
Copy link

This can be closed as Edge-case

@M359AH
Copy link

M359AH commented Feb 7, 2022

It still vulnerable yesterday I takeover 2 subdomains and I've upload my index

@dark-ninja10
Copy link

@M359AH u took over mashed.potato.com even when potato.com is already registered? If yes, please share how you managed to do that? Just curious :0

@M359AH
Copy link

M359AH commented Feb 7, 2022

@jan-muhammad-zaidi

Hello Muhammed

I've found the subdomain I got this error page

Screen Shot 2022-02-07 at 12 20 49 PM

  • After it, I go to see the CNAME
;; AUTHORITY SECTION:
vercel.app.		60	IN	SOA	ns1.vercel-dns.com. hostmaster.nsone.net. 1644228969 43200 7200 1209600 60

;; Query time: 134 msec
;; SERVER:#53(.131)
;; WHEN: Mon Feb 07 12:41:00 EET 2022
;; MSG SIZE  rcvd: 119

Now I go to vercel.app and add a public repository contains my PoC index and after import the project I've add the domain and added successfully

and my PoC has been uploaded

@dark-ninja10
Copy link

How come it's not showing a domain already registered error? Like this
image

@M359AH
Copy link

M359AH commented Feb 7, 2022

Hello @jan-muhammad-zaidi

I think your target is not vulnerable because It should be registered without an errors like my comment above

@M359AH
Copy link

M359AH commented Feb 7, 2022

Your index should be uploaded like It:

Screen Shot 2022-02-07 at 3 38 12 PM

Sorry for my bad image edit 😅 😂 😂

@dark-ninja10
Copy link

@M359AH no issues with the edit though :P

@umar98
Copy link

umar98 commented May 22, 2022

Untitled

Any luck on how to do this?

@Fatmanpoc
Copy link

Untitled

Any luck on how to do this?

got same error...any clue on this?

@M359AH
Copy link

M359AH commented Jun 20, 2022

Hello Fatma, Umar

Unfortunately, I didn't find this error before

@jareddarkweb
Copy link

me aswelll

@Faizee-Asad
Copy link

https://vercel.com/docs/concepts/projects/custom-domains

@boryspierov
Copy link

Untitled

Any luck on how to do this?

same error , vercel fixed the bug no luck

@abuvanth
Copy link

no more takeover

@joren485
Copy link
Contributor

Domain takeovers using Vercel are definitely still possible.

However, they are limited. In my testing, I found that a domain is not vulnerable if:

  • The root domain is used by a Vercel account (i.e. the root domain points to 76.76.21.21 and is linked to a project).
  • The domain/root domain is verified, even if the root domain does not point to 76.76.21.21.
  • Another subdomain of the same root domain is used by a Vercel account.

In practice, this means many subdomains will not be vulnerable (but subdomains definitely can be vulnerable).

There seems to be only one way to be sure a domain is vulnerable or not: try it out.

I created a PR to update the README: #375

@badhacker0x1
Copy link

image

@aravindb26
Copy link

aravindb26 commented Aug 2, 2023

I have the same error but it can be only possible if we configure DNS to that custom domain that should be shown in the Domains category but it's not showing, how could we add DNS?

@excommunicado110
Copy link

Any success on this?

@brijesh1353
Copy link

I have the same error but it can be only possible if we configure DNS to that custom domain that should be shown in the Domains category but it's not showing, how could we add DNS?

This has happened to me too, please show me the solution

@xElkomy
Copy link

xElkomy commented Jan 5, 2024

It's not possible anymore because you have to add a txt record, and that is not possible in the case of subdomain takeover.

image

@M359AH
Copy link

M359AH commented Jan 5, 2024

Yes I think the exploitation now will not complete

@rew1nter
Copy link

Shouldn't this be marked not vulnerable at this point?

@dark-ninja10
Copy link

It should be closed as Not Vulnerable

@Atharv34
Copy link

Edge Case.
Screenshot 2024-04-18 231240

@pdelteil
Copy link
Contributor

Edge Case. Screenshot 2024-04-18 231240

This is not the example of an edge case. Edge case would be if you managed to take over the subdomain due to uncommon or unknown conditions.

@zangcc
Copy link

zangcc commented Jun 6, 2024

Is this vulnerability no longer exploitable? Why hasn't the Status changed to Not vulnerable?
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
edge case An edge case was discovered where it is possible to hijack a subdomain on this service.
Projects
None yet
Development

No branches or pull requests