-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Password reset GraphQl endpoint can be used for User enumeration #37886
Comments
Hi @Hexmage. Thank you for your report.
Join Magento Community Engineering Slack and ask your questions in #github channel. |
Hi @engcom-Bravo. Thank you for working on this issue.
|
Hi @Hexmage, Thank you for reporting and collaboration. Verified the issue on Magento 2.4-develop instance.Kindly refer the screenshots. for EXISTING ACCOUNT for NON-EXISTING ACCOUNT It looks like expected behaviour of Magneto for non existing account it is returning Cannot reset the customer's password because the customer is not there in the records with that email address. could you please let us know if we are missing anything. Thanks. |
@engcom-Bravo |
@magento give me 2.4-develop instance |
Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Bravo, here is your Magento Instance: https://bbf6138a5dcf7f402f0830b05f43c766.instances-prod.magento-community.engineering |
Hi @Hexmage, Thanks for your update. As per this document https://developer.adobe.com/commerce/webapi/graphql/schema/customer/mutations/request-password-reset-email/ the requestPasswordResetEmail mutation used initiate the process to reset the registered customer's password and it is working fine for registered customers. Regarding for Non-Existing account there is no information but we can consider it a good-to-have feature. Hence marking this issue as a feature request. Thanks. |
Preconditions and environment
Steps to reproduce
"mutation requestPasswordResetEmail() { requestPasswordResetEmail(email: 'existing@example.org')}
"mutation requestPasswordResetEmail() { requestPasswordResetEmail(email: 'nonexisting@example.org')}
Expected result
Both return a successful password reset message
{"data":{"requestPasswordResetEmail":true}}
Actual result
The existing one returns:
{"data":{"requestPasswordResetEmail":true}}
The non existing one returns:
{ "errors": [ { "message": "Cannot reset the customer's password", "extensions": { "category": "graphql-input" }, "locations": [ { "line": 2, "column": 3 } ], "path": [ "requestPasswordResetEmail" ], "code": 502 } ], "data": { "requestPasswordResetEmail": null } }
This means that the reset password graphql endpoint can be used to identify if accounts exist or not. Which is potentially harmful to the account owner.
Additional information
Preferably both calls should take the same amount of time to send a response. As more advanced bots will use the difference in response time to determine if an account exists or not.
Release note
No response
Triage and priority
The text was updated successfully, but these errors were encountered: