github.com/nhost/nhost
Affected
- introduced
0, fixed0.0.0-20260430132514-52c70664a7e9(semver)
Fixed versions
0.0.0-20260430132514-52c70664a7e9
Fix
- Fixed version
0.0.0-20260430132514-52c70664a7e9go get github.com/nhost/[email protected]
Advisory
Also known as: GO-2026-5222
nhost has Session Persistence After Password Change
Description
When a user changes their password, either through the authenticated password change endpoint or a password reset ticket, the `ChangePassword` workflow correctly hashes and persists the new password via `UpdateUserChangePassword`. However, it does not revoke existing sessions. The auth.refresh_tokens and auth.oauth2_refresh_tokens tables are left untouched, meaning all previously issued refresh tokens remain valid and can continue generating new access tokens indefinitely.
This vulnerability affects all password change paths (handled in `change_user_password.go`), since they share the same underlying workflow:
auth.oauth2_refresh_tokensAttack Scenario
password_hash but performs no session cleanup, the stolen token remains fully functional.Impact
The attacker retains persistent access even after the victim's password change. This is especially severe in credential theft scenarios, where the victim's only recovery action does nothing against an active session. Depending on configured TTL, the attacker's window could be days or weeks.
Low Basis: The source's own band: LOW
0, fixed 0.0.0-20260430132514-52c70664a7e9 (semver)0.0.0-20260430132514-52c70664a7e9
0.0.0-20260430132514-52c70664a7e9go get github.com/nhost/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0