Account Takeover and Persistence due to the Oauth Misconfiguration in calcom/cal.com

Valid

Reported on

Feb 12th 2023


Team,

May you all be well on your side of the screen. :)

*. While Doing some research on thehttps://cal.com/, I was able to find a Pre-Account Takeover vulnerability.

Proof of concept:

*. I have created a video demonstration of the vulnerability and uploaded it to my Google Drive.

*. The link for the video is provided below for your review:

https://drive.google.com/file/d/15rHB1CNK1AvmtCL6eS7wXEA98wzEuql9/view?usp=sharing

Steps to Reproduce:

*. Go to the https://cal.com/

*. Try to create new account by using the victim email address.

Example:

*. My victim: testerheredaw@gmail.com

*. Once done with entering the needful details for signup, we were landed on the dashboard directly by using the victim email.

*. In attacker end attacker has victim email id and password to login on the https://cal.com/

*. Victim end, victim receiving email notification for account verification or something from thehttps://cal.com/ and victim checking it out.

*. Then, victim can try to login through the Google Oauth SSO, what happens here victim can directly land on the dashboard by using the SSO.

*. Which shows attacker end attacker can login through the victim email address and password, victim end victim can login through the Google Oauth SSO.

*. Since, Attacker and victim end same account was used on.

*. Until victim identifies this is attacker created account, and then until victim change the password and or adding Authenticator OTP, both of their ends the same account was accessed.

*. That's the issue and it shows the Account Takeover.

Solution:

*. Either don't let the user enter with Oauth when there's already another account created with the same email or let the user enter but let him know someone else has already created an account and if it was him or not then ask him to change the password.

*. First, clearly verify the Email OTP or link, then give the access to the dashboard.

*. The easiest remediation to this issue is to ensure that the email verification is adequately implemented and can not be bypassed.

*. Further, by ensuring that the social logins are correctly implemented, the email extracted from the social login is verified against the existing user’s database to ensure that the victim asked to reset the password.

*. By doing so, it is possible to remove the attacker’s persistence.

Impact

*. Victim Account Take Over.

*. Since, there is no email confirmation, an attacker can easily create an account in the application using the Victim’s Email.

*. This allows an attacker to gain pre-authentication to the victim’s account.

*. Further, due to the lack of proper validation of email coming from Social Login and failing to check if an account already exists, the victim will not identify if an account is already existing.

*. Hence, the attacker’s persistence will remain.

*. An attacker would be able to see all the activities performed by the victim user impacting the confidentiality and attempt to modify/corrupt the data impacting the integrity and availability factor.

*. This attack becomes more interesting when an attacker can register an account from an employee’s email address.

*. Assuming the organization uses G-Suite, it is much more impactful to hijack into an employee’s account.

We are processing your report and will contact the calcom/cal.com team within 24 hours. 10 months ago
Manojkumar J modified the report
10 months ago
We have contacted a member of the calcom/cal.com team and are waiting to hear back 10 months ago
Manojkumar J
9 months ago

Researcher


Hello Team,

Is there any update?

calcom/cal.com maintainer
9 months ago

Maintainer


Hi there,

Please accept our apologies on the delay in getting back to you.

This email appeard to have got missed in our inbox.

I will chase this now and provide you with an update when one becomes available.

Kind regards, Connor Gargano Security and Compliance Manager connor@cal.com

Manojkumar J
9 months ago

Researcher


Hello, IS there any update available in this report?

calcom/cal.com maintainer
9 months ago

Maintainer


Hi there,

Apologies for the delay.

This has been looked into from our engineering team and the vulnerability should now be resolved.

You can see the PR here: https://github.com/calcom/cal.com/pull/7509

If you have any other questions, please feel free to reach back out to me.

Kind regards, Connor Gargano Security and Compliance Manager connor@cal.com

calcom/cal.com maintainer validated this vulnerability 9 months ago
Manojkumar J has been awarded the disclosure bounty
The fix bounty is now up for grabs
The researcher's credibility has increased: +7
calcom/cal.com maintainer gave praise 9 months ago
https://github.com/calcom/cal.com/pull/7509
The researcher's credibility has slightly increased as a result of the maintainer's thanks: +1
calcom/cal.com maintainer
9 months ago

Maintainer


This has now been fixed, however the application will not allow us to mark as fixed.

Please do not work on this.

Manojkumar J
9 months ago

Researcher


What about CVE and Reward?

Manojkumar J
9 months ago

Researcher


I am expecting CVE 100 percentage, reward you mentioned, but I am not gonna take care much about it more than CVE for this one specifically.

Manojkumar J
9 months ago

Researcher


What about authenticator OTP bypass report? I am expecting 2 CVE's. Cheers!

Manojkumar J
8 months ago

Researcher


Hi Team,

Is there any update available?

calcom/cal.com maintainer marked this as fixed in 2.7 with commit c76e5f 8 months ago
The fix bounty has been dropped
This vulnerability has been assigned a CVE
calcom/cal.com maintainer published this vulnerability 8 months ago
Manojkumar J
8 months ago

Researcher


Great work! Much appreciated!

Cheers!

to join this conversation