nhost has Session Persistence After Password ChangeGHSA-7hgr-xvrr-xpw3
Fix: nhost/nhost@52c7066GHSA-7hgr-xvrr-xpw3 is a security vulnerability in github.com/nhost/nhost. A fix is available for github.com/nhost/nhost — see the affected versions and patch details below.
Real-World Exposure
github.com/nhost/nhostReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
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:
- Authenticated password change via the Nhost dashboard or client SDK
- Ticket-based password reset (magic links / recovery flows)
- OAuth2/OIDC sessions managed via
auth.oauth2_refresh_tokens
Attack Scenario
- An attacker steals a victim's refresh token via XSS or a compromised device.
- The victim changes their password, expecting it to terminate all active sessions.
- The server updates
password_hashbut 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/nhost/nhost | all versions | 0.0.0-20260430132514-52c70664a7e9go get github.com/nhost/nhost@v0.0.0-20260430132514-52c70664a7e9 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/nhost/nhost, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/nhost/nhost to 0.0.0-20260430132514-52c70664a7e9 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-7hgr-xvrr-xpw3 is resolved across your whole dependency graph.
Workarounds
Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.
Frequently Asked Questions
Is GHSA-7hgr-xvrr-xpw3 in your dependencies?
Find it across Go, including transitive dependencies.