Skip to content

[1.x] fix: invalidate active sessions when password is changed - #4546

Merged
imorland merged 1 commit into
1.xfrom
im/security-password-change-session-invalidation
Apr 11, 2026
Merged

[1.x] fix: invalidate active sessions when password is changed#4546
imorland merged 1 commit into
1.xfrom
im/security-password-change-session-invalidation

Conversation

@imorland

@imorland imorland commented Apr 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Active access tokens (session, remember, developer) were not cleared when a user's password changed
  • Sessions established before a password reset — or during an account takeover — remained valid indefinitely
  • Adds clearAccessTokens to TokensClearer, fired on PasswordChanged, deleting all access tokens for the user

Test plan

  • PasswordChangeSessionInvalidationTest::active_sessions_are_invalidated_when_password_is_changed — fails before fix, passes after
  • Existing PasswordEmailTokensTest suite — no regressions

@imorland imorland changed the title fix: invalidate active sessions when password is changed [1.x] fix: invalidate active sessions when password is changed Apr 11, 2026
Active access tokens (session, remember, developer) were not cleared
when a user's password changed. An attacker who completes a password
reset retains any sessions they previously held, and legitimate sessions
remain valid after an account takeover scenario.

Adds `clearAccessTokens` to `TokensClearer`, fired on `PasswordChanged`.
@imorland
imorland force-pushed the im/security-password-change-session-invalidation branch from b2ca517 to fb9f2a6 Compare April 11, 2026 11:31
@imorland imorland added this to the 1.8.16 milestone Apr 11, 2026
@imorland
imorland marked this pull request as ready for review April 11, 2026 12:39
@imorland
imorland requested a review from a team as a code owner April 11, 2026 12:39
@imorland
imorland merged commit 5f08029 into 1.x Apr 11, 2026
409 checks passed
@imorland
imorland deleted the im/security-password-change-session-invalidation branch April 11, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant