VulnWatch by ve1ve2
medium 6.8 EPSS 0.22%

GHSA-6j4w-g4jh-xjfx / CVE-2026-43911: Refresh tokens not invalidated on security stamp rotation

Source:
Vaultwarden releases + advisories (GitHub dani-garcia/vaultwarden)
Published:
Fetched:
Updated:
Affects:
dani-garcia Vaultwarden

https://github.com/dani-garcia/vaultwarden/security/advisories/GHSA-6j4w-g4jh-xjfx ↗

repo-advisoryrustCWE-613securityrepo:dani-garcia/vaultwarden

Refresh tokens not invalidated on security stamp rotation ### Summary Refresh tokens are not invalidated when the user's `security_stamp` is rotated by some security-sensitive operations (password change, KDF change, key rotation, email change, org admin password reset, emergency access takeover). This allows an attacker holding a previously obtained refresh token to maintain session access even after the user has taken action to secure their account. ### Details #### How access tokens are validated When a client makes an API request with an access token, `Headers::from_request` in `src/auth.rs` (line ~626) checks that the `sstamp` claim embedded in the JWT matches the user's current `security_stamp` in the database. If they don't match, the request is rejected (unless a temporary stamp exception applies). This correctly invalidates access tokens after stamp rotation. #### How refresh tokens bypass the sstamp check The refresh token flow (`refresh_tokens` in `src/auth.rs`, line ~1205) works as follows: ```rust pub async fn refresh_tokens( ip: &ClientIp, refresh_token: &str, client_id: Option, conn: &DbConn, ) -> ApiResult<(Device, AuthTokens)> { let refresh_claims = decode_refresh(refresh_token)?; let mut device = Device::find_by_refresh_token(&refresh_claims.device_token, conn).await .ok_or("Invalid refresh token")?; device.save(true, conn).await?; let user = User::find_by_uuid(&device.user_uuid, conn).await .ok_or("Impossible to find user")?; // No security stamp validation here let auth_tokens = AuthTokens::new(&device, &user, refresh_claims.sub, client_id); Ok((device, auth_tokens)) } ``` The `RefreshJwtClaims` struct does not contain a `security_stamp` field: ```rust pub struct RefreshJwtClaims { pub nbf: i64, pub exp: i64, pub iss: String, pub sub: AuthMethod, pub device_token: String, pub token: Option, // No sstamp / security_stamp field } ``` Since the refresh flow only looks up the Device by `device_token` and never checks the security stamp, any refresh token issued before a stamp rotation remains valid as long as the Device record exists in the database. #### Comparison with upstream Bitwarden The upstream Bitwarden server (`bitwarden/server`) persists the `SecurityStamp` claim into the grant when issuing a refresh token. On every refresh, `ProfileService.IsActiveAsync` validates this: ```csharp // From bitwarden/server src/Identity/IdentityServer/ProfileService.cs public async Task IsActiveAsync(IsActiveContext context) { var securityTokenClaim = context.Subject?.Claims .FirstOrDefault(c => c.Type == Claims.SecurityStamp); var user = await _userService.GetUserByPrincipalAsync(context.Subject); if (user != null && securityTokenClaim != null) { context.IsActive = string.Equals( user.SecurityStamp, securityTokenClaim.Value, StringComparison Affected packages: rust:Vaultwarden Patched: Vaultwarden 1.35.5

Linked vulnerabilities (2)

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Refresh tokens not invalidated on security stamp rotation

CWE: CWE-613Aliases: CVE-2026-43911
CVE-2026-43911 medium 6.8 EPSS 0.22% (p12) NVDCVE.orgGHSA
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N

Refresh tokens not invalidated on security stamp rotation

CWE: CWE-613Aliases: GHSA-6j4w-g4jh-xjfx