Skip to content

Password Change Does Not Revoke Active Sessions

Moderate
Siumauricio published GHSA-rr9m-w87g-46f3 Jul 21, 2026

Package

npm dokploy (npm)

Affected versions

<0.29.4

Patched versions

None

Description

Summary

Changing a user's password does not revoke existing sessions. An attacker who has compromised a session token retains full access even after the legitimate user changes their password, defeating the standard incident response action of credential rotation.

Details

The password change handler (apps/dokploy/server/api/routers/user.ts:201-250) updates the account.password field but does not call any session revocation API. Sessions have a 3-day lifetime (auth.ts:354) with updateAge: 60*60*24, meaning an attacker's compromised session can persist for up to 3 days after the password is changed.

Better-auth provides auth.api.revokeSessions({ userId }) for exactly this purpose, but it is not called during the password change flow.

Note: member removal and role downgrade were tested and both correctly terminate sessions immediately. Only the password change path is affected.

PoC

Prerequisites: A Dokploy instance with a test user account.

Step 1 — Establish a session:

Log in as a test user and note the session token from the better-auth.session_token cookie.

Step 2 — Change the password:

Change the user's password through the UI or API.

Step 3 — Use the pre-change session token:

GET /api/trpc/user.all HTTP/1.1
Host: <target>
Cookie: better-auth.session_token=<PRE_PASSWORD_CHANGE_TOKEN>

The request succeeds. The old session remains valid despite the password change.

Impact

The standard incident response procedure of changing a compromised password does not lock out an attacker who holds an active session. The attacker retains full access at the compromised user's privilege level for up to 3 days after the password is rotated. This is particularly dangerous when combined with other findings that enable session compromise.

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

CVE ID

CVE-2026-45791

Weaknesses

Insufficient Session Expiration

According to WASC, Insufficient Session Expiration is when a web site permits an attacker to reuse old session credentials or session IDs for authorization. Learn more on MITRE.

Credits