CVE-2024-28239: Directus open redirect in OAuth2/OpenID login

CVE-2024-28239 · Severity: low · CVSS 3.1 · Published 2024-03-12

Directus, a popular open-source headless CMS platform, contains an open redirect vulnerability in its OAuth2/OpenID login flow. Attackers can craft malicious login links that, after successful authentication, redirect users to attacker-controlled sites designed to appear as legitimate error pages, enabling credential phishing attacks. This vulnerability affects users authenticating through OAuth2 providers.

Technologies: directus (npm). Vendors: npm.

Quick answers

Is CVE-2024-28239 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2024-28239 being exploited in the wild.
How severe is CVE-2024-28239?
Low severity, with a CVSS score of 3.1, published 12 March 2024.
Which products and versions are affected?
directus (npm) SEMVER:introduced=0,fixed=10.10.0.
Is there a fix for CVE-2024-28239?
Yes. directus (npm): upgrade to 10.10.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2024-28239 attacked?
It is attacked over the network.
Am I affected by CVE-2024-28239?
Check whether you run directus (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • directus (npm): upgrade to 10.10.0 or later
    npm install directus@10.10.0

Technical details

The vulnerability exists in the authentication API's redirect parameter (e.g., /auth/login/google?redirect=...) which fails to properly validate redirect destinations. An attacker can craft a URL with a redirect parameter pointing to a malicious domain. After the user successfully authenticates via OAuth2, the application redirects them to the attacker's site without validation. The vulnerable code is in the oauth2.ts driver. The attack requires user interaction (clicking the crafted link) but no authentication or special privileges. An attacker can exploit this to redirect authenticated users to phishing sites mimicking password reset pages to steal credentials. The issue was patched in version 10.10.0.

Affected products

  • Directus Directus <10.10.0

Identifiers

  • CVE-2024-28239
  • GHSA-fr3w-2p22-6w7p

Timeline

  • 2024-03-12: disclosed
  • 2024-03-12: patched: Fixed in version 10.10.0

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.