Operation on a Resource after Expiration or Release Affecting @directus/api package, versions >=18.0.0 <25.0.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-DIRECTUSAPI-9535117
  • published27 Mar 2025
  • disclosed26 Mar 2025
  • creditUnknown

Introduced: 26 Mar 2025

NewCVE-2025-30351  (opens in a new tab)
CWE-672  (opens in a new tab)

How to fix?

Upgrade @directus/api to version 25.0.0 or higher.

Overview

@directus/api is a real-time API and App dashboard for managing SQL database content

Affected versions of this package are vulnerable to Operation on a Resource after Expiration or Release due to a missing check in verifySessionJWT. An attacker can continue to access the API using a session token even after the user has been suspended by using the token obtained prior to suspension.

Note:

This is only exploitable if the /auth/refresh call is not triggered, as that would invalidate the session token.

PoC

  1. Create an active user

  2. Log in with that user and note the session cookie

  3. Suspend the user (and don't trigger an /auth/refresh call, as that invalidates the session

  4. Access the API with Authorization: Bearer <token>

References

CVSS Base Scores

version 4.0
version 3.1