CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-7HGR-XVRR-XPW3

GHSA-7HGR-XVRR-XPW3: Session Persistence After Password Change in Nhost hasura-auth

Amit Schendel
Amit Schendel
Senior Security Researcher

May 8, 2026·5 min read·39 visits

Executive Summary (TL;DR)

Nhost's hasura-auth component fails to clear active refresh tokens upon a password change. Attackers holding stolen tokens can continue generating valid access tokens indefinitely.

A critical session management vulnerability in Nhost's authentication service allows attackers to maintain unauthorized access following a password reset. The password update operation fails to invalidate existing refresh tokens in the database, violating standard session revocation principles and rendering password changes ineffective as an incident response measure.

Vulnerability Overview

The hasura-auth service manages identity and token issuance for the Nhost platform. It utilizes a dual-token architecture consisting of short-lived JSON Web Tokens (JWTs) for API access and long-lived refresh tokens stored persistently within the database.

The vulnerability, categorized as CWE-613 (Insufficient Session Expiration), affects the core session revocation lifecycle. Specifically, the password reset and modification routines omit the mandatory invalidation of active refresh tokens associated with the user account.

Standard security models dictate that cryptographic credential changes must uniformly terminate all concurrent sessions across all devices. The failure to enforce this global logout principle fundamentally undermines the utility of a password change as a reliable incident response mechanism.

Attackers who have previously acquired a valid refresh token maintain unimpeded system access regardless of subsequent password rotations. This structural flaw exposes user accounts to prolonged unauthorized access and potential data exfiltration.

Root Cause Analysis

The underlying flaw originates in the database queries utilized by the ChangePassword handler inside the hasura-auth Go service. The relevant file, services/auth/go/sql/query.sql, manages the state transition during a user-initiated credential update.

The legacy implementation executed a solitary UPDATE statement targeting the password_hash column within the auth.users table. This instruction accurately mutated the stored credential representation but terminated the database transaction without modifying dependent authentication tables.

Nhost's architecture isolates session state into dedicated relations, specifically the auth.refresh_tokens and auth.oauth2_refresh_tokens tables. Because the password mutation process did not explicitly reference or truncate these tables, all existing cryptographic tokens retained their active status in the database.

When a user presents a refresh token to the /token endpoint, the backend validation logic verifies the token's presence in the auth.refresh_tokens table. Since the password update logic neglected to purge these records, the server evaluates the compromised token as entirely valid and authorized.

Code Analysis

Examining the vulnerable codebase reveals a straightforward procedural oversight in the SQL implementation. The original database operation isolated the password modification logic from the broader session management responsibilities.

The following snippet demonstrates the legacy SQL query responsible for executing the password modification. The transaction solely updates the credential hash without interacting with the necessary session state tables.

UPDATE auth.users
SET password_hash = $2
WHERE id = $1
RETURNING id;

Nhost developers addressed this vulnerability via commit 52c70664a7e92031e592b873471939b10ca18079. The remediation introduces a Common Table Expression (CTE) to guarantee atomicity between the password update and the token revocation operations.

The patched SQL logic bundles the user table update with unconditional deletions from both token tables. This ensures any successful credential change immediately invalidates all associated active sessions at the database tier.

WITH updated_user AS (
    UPDATE auth.users
    SET password_hash = @password_hash
    WHERE id = @id::uuid
    RETURNING id
),
revoked_refresh_tokens AS (
    DELETE FROM auth.refresh_tokens
    WHERE user_id = @id::uuid
),
revoked_oauth2_refresh_tokens AS (
    DELETE FROM auth.oauth2_refresh_tokens
    WHERE user_id = @id::uuid
)
SELECT id FROM updated_user;

Exploitation Methodology

Exploitation of GHSA-7HGR-XVRR-XPW3 requires an attacker to possess a pre-existing valid refresh token. Threat actors typically acquire these tokens through cross-site scripting (XSS) payloads, endpoint compromise, or the interception of unencrypted network traffic.

Upon discovering anomalous account activity, a prudent user typically initiates a password reset operation. In a standard implementation, this action severs all existing connection states and locks the attacker out of the environment immediately.

Due to the flawed database logic, the attacker retains the stolen refresh token and submits it to the Nhost /token endpoint. The server, finding the token intact within the auth.refresh_tokens table, willingly issues a new, valid JWT access token.

The attacker proceeds to authenticate against downstream API endpoints using the newly generated access token. This continuous issuance cycle allows the adversary to bypass the credential rotation and maintain persistent administrative control over the compromised account.

Client-Side Fix & Remediation

Mitigating this vulnerability required coordinated modifications across both the backend identity service and the client-side SDK. Relying exclusively on server-side token revocation leaves client applications in an inconsistent state, potentially causing operational loop failures or unexpected user experiences.

The nhost-js SDK received a dedicated architectural update to align client state with the server's post-rotation reality. Developers introduced the updateSessionFromResponseMiddleware component to intercept successful password update operations and trigger a local environment purge.

The typescript middleware evaluates HTTP responses originating from the /user/password endpoint. Upon detecting a successful 200 OK status, the SDK forcefully clears the local storage, mandating that the user authenticate with the newly established credentials.

if (url.endsWith('/user/password') && response.ok) {
  storage.remove();
  return response;
}

Organizations utilizing self-hosted Nhost deployments must upgrade to a version incorporating Pull Request #4192. Administrators managing legacy instances unable to upgrade immediately must manually truncate records within auth.refresh_tokens for any user undergoing a suspected account compromise.

Official Patches

NhostFix Commit
NhostPull Request

Fix Analysis (1)

Technical Appendix

CVSS Score
7.5/ 10

Affected Systems

Nhost hasura-auth backend serviceNhost nhost-js client SDK

Affected Versions Detail

Product
Affected Versions
Fixed Version
hasura-auth
Nhost
< PR #4192PR #4192
nhost-js
Nhost
< PR #4192PR #4192
AttributeDetail
CWE IDCWE-613: Insufficient Session Expiration
Attack VectorNetwork (Requires stolen refresh token)
Estimated CVSS7.5 (High)
ImpactPersistent unauthorized access post-credential rotation
Exploit StatusConceptually straightforward, requires prerequisite compromise
Patch StatusFixed in PR #4192

MITRE ATT&CK Mapping

T1539Steal Web Session Cookie
Credential Access
T1098Account Manipulation
Persistence
CWE-613
Insufficient Session Expiration

The application does not properly invalidate a session when the user logs out or changes credentials.

Vulnerability Timeline

Patch merged via PR #4192
2026-04-30

References & Sources

  • [1]GitHub Advisory: Session Persistence After Password Change
  • [2]Pull Request 4192: Fix session invalidation on password change
  • [3]Commit 52c70664a7e92031e592b873471939b10ca18079

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•1 day ago•CVE-2026-58197
8.8

CVE-2026-58197: Host Escape and Lateral Movement via Insecure Container Network Defaults in ToolHive

A high-severity access control vulnerability in ToolHive CLI before v0.30.1 and ToolHive Studio before v0.38.0 allows local containerized MCP servers to bypass network isolation. This enables malicious workloads to establish TCP/IP connections to administrative and control plane endpoints exposed on the host loopback interface.

Amit Schendel
Amit Schendel
8 views•8 min read
•1 day ago•CVE-2026-63405
5.9

CVE-2026-63405: Insufficient Verification of Data Authenticity in AnyCable Pusher REST API

AnyCable is a real-time communication server. Prior to version 1.6.15, its Pusher-compatible REST API suffered from an authentication bypass vulnerability because it failed to verify that the request body matched the signature-validated body_md5 parameter. This allows attackers to perform replay attacks with modified body contents.

Amit Schendel
Amit Schendel
9 views•5 min read
•1 day ago•CVE-2026-64847
6.8

CVE-2026-64847: Indefinite Denial of Service via Undrained Stderr in AnyIO Process Pool Workers

A denial-of-service vulnerability exists in AnyIO prior to version 4.14.2. Standard error streams of process-pool workers are connected to an operating system pipe that is never drained by the parent process. This allows a worker to fill the pipe buffer and deadlock indefinitely.

Amit Schendel
Amit Schendel
8 views•6 min read
•2 days ago•CVE-2026-63349
7.0

CVE-2026-63349: Privilege Dropping Bypass and Denial of Service in AnyIO Subprocess Module

CVE-2026-63349 is a critical privilege-dropping bypass vulnerability in the AnyIO asynchronous framework (versions 4.14.0 and 4.14.1) on POSIX platforms. Due to a variable assignment typo, supplementary groups specified by the developer are not correctly propagated to the execution backend, resulting in subprocesses retaining the parent process's elevated supplementary group permissions.

Alon Barad
Alon Barad
14 views•5 min read
•2 days ago•CVE-2026-63406
5.9

CVE-2026-63406: Information Disclosure via Insecure Telemetry and Hardcoded Credentials in AnyCable-Go

CVE-2026-63406 is an information disclosure vulnerability in AnyCable-go prior to version 1.6.15. The built-in telemetry client is enabled by default with a hardcoded public authentication token ('secret'). This client digests highly sensitive configuration parameters and command-line arguments, including JWT secrets and RPC secrets, into a stable SHA-256 fingerprint. This fingerprint is sent over public networks, exposing those administrative secrets to offline dictionary and brute-force attacks if intercepted.

Alon Barad
Alon Barad
7 views•5 min read
•2 days ago•CVE-2026-84992
6.1

CVE-2026-84992: Cross-Site Scripting (XSS) via Fenced Code Block Parsing in md-editor-v3

CVE-2026-84992 is a Cross-Site Scripting (XSS) vulnerability affecting md-editor-v3 before version 6.5.4. It occurs because the fenced-code block language parser directly interpolates unescaped language metadata into unquoted HTML attributes inside the custom rendering callback. This bypasses the built-in XSSPlugin which runs during the parsing phase, before rendering.

Amit Schendel
Amit Schendel
9 views•6 min read