Skip to content

No confirmation email sent to user after a successful password reset #928

Description

@iamtanuj18

UsersController.resetPassword in application/backend/src/controllers/UsersController.ts validates the reset token, updates the user's password hash, and marks the token as used. but no confirmation email goes out to the user after the reset completes. generatePasswordResetLink sends the initial reset link, but once the user clicks the link and submits a new password, nothing lands in their inbox.

Risk: the user has no way to detect a password reset that wasn't triggered by them. If someone managed to trigger a reset on their account (e.g. by intercepting an already-issued reset link etc), the legitimate user gets no signal until they try to log in with their old password and fail.

Google, Auth0 and most modern SaaS platforms send a "your password was changed" email on every successful reset specifically to catch this class of attack early.

Suggested fix: at the end of resetPassword, after the password hash is written and the token is marked used, send a confirmation email to the user's current email address ("Your CTRL password was changed. If this wasn't you, contact support.").

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions