-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
You can confirm emails you don't own if multifactor is turned on in Cognito #2102
Comments
sent this email today to google cloud platform and amazon web services: Dear GCP/AWS, If this issue we care about also exists on Google Cloud Platform then I don’t see how we justify the hassle of switching bitpharma.com from AWS when we need to pitch investors I’m building an express server for this, but I shouldn’t have to. I’m an Immunologist working alone on this and GCP/AWS teams are software experts for many years Yes, you’re right, we can block accounts w/ unverified emails from accessing resources, but burner numbers are easy to get. I get ROBO DIALS multiple times per week. We want to simultaneously verify phone and email for many reasons:
Do you think fewer forms, faster/better/easier on-boarding (lower bounce rate), less trusted codebase, simpler UX, and stronger “borders” are worth a few day’s work? Here’s some code to solve the problem: Client: Server: Just imagine a DDOS which signs up for your site with fake numbers or emails. If we look at both before we send codes then we save millions of dollars AND increase probability users will sign up, because nobody likes forms. And people use your forms many many times every day. Just multiply the hassle of an extra form across all the users on all the platforms hosted on GCP and AWS — that is literally years of people’s lives wasted just so we can dodge writing some simple code. How do you justify that? can you please just get your engineers to simplify + secure sign-up? If I’m wrong here then please tell me and explain your reasoning... BAH |
As you know, we (AWS) have reviewed your GitHub issues (#1685, #1959, and #2102), replied multiple times, and spoke with you on the phone. Just to summarize: We understand that you “expect the system to send verification to both the user's phone and email” during signup. However, as we state in our documentation, this is not yet a feature Cognito supports: Important While most customers' use cases have been satisfied with the ability to verify either by phone number OR email address, we understand that your particular application has the requirement to verify both phone number AND email address. We've therefore provided you instructions on how your application can verify both the user's phone and email in the Cognito Developer Guide and GitHub issue #1959. As we’ve also shared, we’re happy to help you implement this in your app. We understand that you’d prefer the service offer the feature above more easily, but this is not a security issue in the service as it’s working as documented. Your screenshot in issue #2102 does not demonstrate a security vulnerability. In your example, the user shows confirmed. A viewer might incorrectly assume that the jeff@ email address was used to confirm the user, however if you click on the username you can view the user details page where we clearly show that jeff@ email address itself is not verified. The user was confirmed via phone, matching the Cognito documentation. We do appreciate your feedback, and agree that we could probably make the UI clearer. We will move quickly on trying to make those tweaks. We will also explore your feature request of verifying users by both email and phone number for our longer-term roadmap, however, we understand if Cognito does not yet meet your immediate needs for this project. Thank you for sharing your feedback, (Posted on behalf of...) |
we'll use email only for now and avoid multifactor. it does seem like a security + UX issue and a priority. |
https://en.wikipedia.org/wiki/Vulnerability_(computing) confidentiality is a set of rules that limits access to information, Yes you’re right, information could be kept confidential in this case, BUT... How do you possibly argue “CONFIRMED” in huge letters next to jeff@amazon.com on something he did not sign up for is at all “trustworthy and accurate?” How do you possibly argue that it’s “guaranteed reliable access” when literally anyone can put any email is already in use and then the actual owner of the email account can’t sign up? |
Tired of games.
|
I'm surprised how incompetent AWS team showing off itself in this issue. Shame. |
I forgive AWS for this delay because I didn’t realize the severity of the issue myself either. Azure and GCP also verify these fields independently. Only noticed this because I’m a perfectionist building a startup and want to use fewer forms, but now I realize it’s deeper than UX. Don’t worry, the good news is, we found it, and when we fix it, the system will be even more secure. It’s better we found it when the stakes weren’t so high than to find it later by hackers using it maliciously. It’s probably possible to fix fast and easily but I’m not certain, can you please take a fresh look? Bion Howard (a biologist) medium.com/bit-pharma bitpharma.com |
The "CONFIRMED" status means that the account itself is confirmed. It's one of the states the account can be in. This should not be confused with email or phone number verification. I understand that it may be misleading from the UX point of view, because the status appears next to the email address in the UI. There are special attributes in the user pool record that track the verification process for the attributes. If the user verified their email, then I don't think that the jeff@amazon.com account in your user pool has the |
1, More Forms, (not so bad, just crappy UX)
|
@elorzafe @adrianhall Here's some code to fix this issue (from above) Client: Server: const confirmsignup = (req, res) => { How do you make the codes available to both the user and to the confirm script? It would really be awesome to be able to make medical apps on Amplify / Cognito! We wanted to use Firebase but they are not HIPAA compliant and their sales never got back to us on that, so we're depending on AWS to make this secure for medical records applications ... Can you help us out with this fix / request? |
Hello @bionicles Per the note above the ability to deny login until both the email AND phone number have been confirmed isn’t currently supported by Cognito but they have taken it as a feature request. However if you would still like to use Cognito as part of your overall solution to provide this functionality, we brainstormed on this a bit internally and have the suggested example flow below:
As this is a suggestion of one way to accomplish your use case, and not an official built-in product feature, please let us know if you have any further questions. |
@undefobj Thanks, considering this... Ever get robo dialed? I do, a lot. Even comes from my own telephone number sometimes. Clearly, it is easy for anyone to generate phone numbers these days. Email lists are also available. What stops some jerk from going to any Cognito multifactor service and signing up every email in a huge list? If that's some insurance company, or hospital, then all of those customers are screwed, they can't access their health records, because their email already exists in the user pool. That breaks the HIPAA law because portability / patient access is critical to patients owning their records! I don't think this proposal solves either the availability threat issue or the additional form issue. This proposal doesn't resolve the availability threat because we still add the email to the user pool based only on a phone number. This proposal also still requires every single user to deal with an extra form (1. signup 2. confirm phone, 3. confirm email) for the user when the intended UX is to have 1. signup 2. confirm forms; then 1. login, 2. confirm for returns. How does cognito team intend to deal with robo-signups risk? That's the whole point of this github issue. Captcha was defeated by neural nets 6 years ago ... you can obfuscate your IP address... I'm just not sure why it takes a year to add this feature to Cognito. Do we have to wait around for somebody to exploit this in order to get AWS to fix it? I don't want to deal with cognito hole where scripts can sign up many many emails to our service. I also don't want every user to have to fill out 2 forms when they could theoretically figure out 1. I just want to click "enable simultaneous multifactor" in the Cognito console, and be done. It's not right for AWS to force customers to jump through hoops to solve this issue. That's tons of extra work for many different groups, when cognito team could fix it on the service side so people. I really appreciate you taking the time to brainstorm, but an idea is not a tested fix. If 100 customers have to implement this idea over and over and over for AWS, vs AWS just implementing it in the cognito API once, that's 100x more work for the AWS community. Wouldn't it just be easier to add the feature than to keep endlessly discussing, brainstorming, emailing, chatting, delaying, waiting, passing the buck, getting distracted with other stuff? |
If the approach detailed above does not meet your needs, Amazon Cognito as it is today is not a good fit for your specific requirements. The Cognito team has been briefed on your requirements and based on customer demand for similar functionality and competing feature requests will consider it for future roadmap.. |
@undefobj It’s a bug, not a feature. HIPAA compliance eligibility is already advertised as a production feature of cognito, this vulnerability prevents the Cognito system from being highly available in that setting. All we need is a list of public emails and a way to get burner phone numbers and we can prevent anyone from using Cognito multifactor. How is the fix for that a “feature?” |
I have to agree with @bionicles. This is a serious bug, not a feature request. It's not necessarily a security hole as its not allowing one person access to another's account. But being able to block a user from signing up is a huge flaw. We've been using Cognito without ever having identified this issue. We'll now disable multi-factor signup in all of our applications and notify all of our customers accordingly. I've been guilty of consuming the koolaid of AWS knowing and caring more about security than us mere mortals. What's much more worrying than the flaw itself, is the determination to defend the system and not acknowledge that it is a serious issue. Time to re-evaluate the degree to which we should embrace the infrastructure as a service model. |
look, i get you have megacorporation issues and maybe can't open source cognito (and I disagree) you need it for hipaa compliance. you need cognito to use appsync which is the best API on AWS, you need it for 50 billion reasons. but right now if healthcare.gov or pentagon.mil uses AWS and has MFA turned on (they should) then any 8 year old with a working cellphone can deny any user access, let alone state-funded hackers who can automate exploits Am I too perfectionist to expect people to actually own the emails they confirm in my AWS auth service? Do you think it would be possible for you to figure out how we can get working MFA on AWS? why do you expect huge organizations to trust their cybersecurity to closed-source code they can't double-check, lead by a manager who doesn't have a github account? it's totally out of character for amazon. honestly makes Amazon look like lazy, slack-ass hucksters. gee, medical records depend on one of my services? guess i'll hide the code and not update it for YEARS! just imagine you trust the keys to the door to your house to an invisible security guard who doesn't move. does that sound like a good idea? i think not, but that's what every person relying on AWS cognito does every day AWS has 1234567890 services i dont need, and the core stuff I actually do need, does not work, I can't see the code, and I can't make pull requests WTF are you thinking? TWO PIZZAS? PIZZA ISNT EVEN HEALTHY! |
@bionicles @adrianhall Just curious how it all ended? What's the state now 5 years later? |
Ah, I don't know if it's fixed, I stopped using AWS. A friend was able to make a demo app with Cognito relatively recently, it's doable, I just think it's sketchy in general to avoid simultaneous multifactor auth, maybe i'll make a saas for that, right now i'm sucked into details of the postgresql wire protocol but maybe next month |
Describe the bug
if multifactor is turned on in cognito then you can confirm any email address with just your phone
To Reproduce
Steps to reproduce the behavior:
Expected behavior
This vulnerability/exploit is possible because the signUp and confirmSignUp function only requires the SMS code and not the email code to confirm the user.
To fix the vulnerability, signUp must send email and phone codes simultaneously and confirmSignUp must simultaneously verify them.
Screenshots
This screenshot shows Jeff Bezos Email Confirmed on the bitpharma.com Cognito User Pool - we did this entirely using AWS amplify Auth and not through AWS console
Desktop (please complete the following information):
Additional context
This issue prevents us from launching our web platform with a clear conscience because it prevents us from trusting the integrity of the AWS Amplify Cognito Auth system, which also means we can't use AWS AppSync.
That means we can't use the awesome Serverless GraphQL Graph Database we built. We reported the issue to jeff@amazon.com directly 64+ days ago and have opened 2 github issues, contributed code to fix the problem, exchanged emails, phone call, and DMs with AWS Cognito team (raja) and now we're forced to scrap thousands and thousands of dollars worth of engineering and STILL have to rebuild a new solution. UGH! PLEASE FIX!
This issue was closed:
#1959
This issue was ignored:
#1685
We tweeted Andy Jassy about this:
https://twitter.com/ajassy/status/1062130529963655169
We tweeted Jeff Bezos about this:
https://twitter.com/bitpharma/status/1062368063478288384
Today we used it to sign up Jeff Bezos' email with bitpharma.com user pool. Still no word from anyone...
I'm pissed because this is a critical cybersecurity vulnerability and no one at AWS seems to care! This could cause serious headaches if not patched ASAP because hackers can exploit this vulnerability to clog any cognito user pool by registering many many emails they do not own...
@yuntuowang @nidsharm @mlabieniec @powerful23 @mbahar @richardzcode @elorzafe @jordanranz @manueliglesias
This library is too important to leave unsecured. Are you too busy to patch this vulnerability in the cybersecurity of the first step of signup in AWS Amplify Cognito Auth?
The text was updated successfully, but these errors were encountered: