VDB
Sign up
LOW3.5

GHSA-56p6-qw3c-fq2g

Suspended Directus user can continue to use session token to access API

Quick fix

GHSA-56p6-qw3c-fq2g — directus: upgrade to the fixed version with the command below.

npm install directus@11.5.0

Details

### Summary Since the user status is not checked when verifying a session token a suspended user can use the token generated in session auth mode to access the API despite their status.

### Details There is a check missing in `verifySessionJWT` to verify that a user is actually still active and allowed to access the API. Right now one can extract the session token obtained by, e.g. login in to the app while still active and then, after the user has been suspended continue to use that token until it expires.

### PoC * Create an active user * Log in with that user and note the session cookie * Suspend the user (and don't trigger an `/auth/refresh` call, as that invalidates the session * Access the API with `Authorization: Bearer <token>`

### Impact This weakens the security of suspending users.

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/directus
Introduced in: 10.10.0Fixed in: 11.5.0
Fixnpm install directus@11.5.0
npm/@directus/api
Introduced in: 18.0.0Fixed in: 24.0.1
Fixnpm install @directus/api@24.0.1
npm/@directus/types
Introduced in: 11.0.7Fixed in: 13.0.0
Fixnpm install @directus/types@13.0.0

References