Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. @directus/api
  4. ›
  5. CVE-2024-45596

CVE-2024-45596: Session is cached for OpenID and OAuth2 if `redirect` is not used

September 10, 2024

Unauthenticated user can access credentials of last authenticated user via OpenID or OAuth2 where the authentication URL did not include redirect query string.

For example:

  • Project is configured with OpenID or OAuth2
  • Project is configured with cache enabled
  • User tries to login via SSO link, but without redirect query string
  • After successful login, credentials are cached
  • If an unauthenticated user tries to login via SSO link, it will return the credentials of the other last user

The SSO link is something like https://directus.example.com/auth/login/openid/callback, where openid is the name of the OpenID provider configured in Directus

References

  • github.com/advisories/GHSA-cff8-x7jv-4fm8
  • github.com/directus/directus
  • github.com/directus/directus/blob/main/api/src/auth/drivers/oauth2.ts
  • github.com/directus/directus/blob/main/api/src/auth/drivers/openid.ts
  • github.com/directus/directus/commit/4aace0bbe57232e38cd6a287ee475293e46dc91b
  • github.com/directus/directus/commit/769fa22797bff5a9231599883b391e013f122e52
  • github.com/directus/directus/security/advisories/GHSA-cff8-x7jv-4fm8
  • nvd.nist.gov/vuln/detail/CVE-2024-45596

Code Behaviors & Features

Detect and mitigate CVE-2024-45596 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 21.0.1, all versions starting from 22.0.0 before 22.2.0

Fixed versions

  • 21.0.1
  • 22.2.0

Solution

Upgrade to versions 21.0.1, 22.2.0 or above.

Impact 7.4 HIGH

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

Learn more about CVSS

Weakness

  • CWE-384: Session Fixation
  • CWE-524: Use of Cache Containing Sensitive Information

Source file

npm/@directus/api/CVE-2024-45596.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:49 +0000.