CVE-2024-39896: Directus Directus Allows Single Sign-On User Vulnerability

HIGH
Advisory Identifier: GHSA-jgf4-vwc3-r46v
CVSS 7.5
CWE-200
Published
Advisory Summary

CVE-2024-39896 is a HIGH (CVSS 7.5) directus allows single sign-on user vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting Directus libraries in the npm ecosystem. The issue involves directus allows single sign-on user enumeration. Remediation is available by upgrading affected packages to version 10.13.0.

CVE-2024-39896 at a Glance

CVE Identifier CVE-2024-39896
GHSA Identifier GHSA-jgf4-vwc3-r46v
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
Affected Product Directus
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (A:N)

How to Fix CVE-2024-39896

To remediate this vulnerability, upgrade all affected Directus dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

directus fixed: 10.13.0
npm install directus@10.13.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls directus

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2024-39896, inspect your project dependencies using npm:

npm ls directus

Analyze the terminal output to locate any version of Directus in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 10.13.0), your application is affected.

Note: The npm ls directus command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In Directus, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact When relying on SSO providers in combination with local authentication it can be possible to enumerate existing SSO users in the instance. This is possible because if an email address exists in Directus and belongs to a known SSO provider then it will throw a "helpful" error that the user belongs to another provider. ### Reproduction 1. Create a user using a SSO provider `test@directus.io`. 2. Try to log-in using the regular login form (or the API) 3. When using a valid email address | **APP** | **API** | | --- | --- | | ![image](https://github.com/directus/directus/assets/9389634/1da3301d-226f-46a7-bfb8-3f6fb9bc55cd) | ![image](https://github.com/directus/directus/assets/9389634/50cab310-7d1c-4241-a6be-d06542565767) | 4. When using an invalid email address | **APP** | **API** | | --- | --- | | ![image](https://github.com/directus/directus/assets/9389634/7b97659e-b49c-410b-872e-e36786b6e41e) | ![image](https://github.com/directus/directus/assets/9389634/d26ccba7-bb27-437e-991e-99c10941bbe7) | 5. Using this differing error it is possible to determine whether a specific email address is present in the Directus instance as an SSO user. ### Workarounds When only using SSO for authentication then you can work around this issue by disabling local login using the following environment variable `AUTH_DISABLE_DEFAULT="true"` ### References Implemented as feature in https://github.com/directus/directus/pull/13184 https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/03-Identity_Management_Testing/04-Testing_for_Account_Enumeration_and_Guessable_User_Account

CVE-2024-39896 Affected Directus Versions

1 component(s)
Fixed Versions:
10.13.0
Product / Package Ecosystem Affected Versions Fixed Version
directus
npm
≥ 9.11
< 10.13.0
10.13.0

References

Frequently Asked Questions

What is CVE-2024-39896?
CVE-2024-39896 is a security vulnerability in Directus involving Directus Allows Single Sign-On User Enumeration under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor.
Which Directus versions are affected?
Affected versions include releases prior to 10.13.0 across affected packages: directus.
What version fixes CVE-2024-39896?
Upgrading to 10.13.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is directus affected?
Yes, directus is affected in releases prior to 10.13.0. Upgrade your dependency to 10.13.0 or later.
What is the CVSS score of CVE-2024-39896?
CVE-2024-39896 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2024-39896?
CVE-2024-39896 is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor (The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.).
How can I check npm dependencies for CVE-2024-39896?
Run the dependency tree command: 'npm ls directus'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-jgf4-vwc3-r46v",
  "modified" : "2024-07-08T18:41:57Z",
  "published" : "2024-07-08T18:41:57Z",
  "aliases" : [ "CVE-2024-39896" ],
  "summary" : "Directus Allows Single Sign-On User Enumeration",
  "details" : "### Impact\nWhen relying on SSO providers in combination with local authentication it can be possible to enumerate existing SSO users in the instance. This is possible because if an email address exists in Directus and belongs to a known SSO provider then it will throw a \"helpful\" error that the user belongs to another provider.\n\n### Reproduction\n\n1. Create a user using a SSO provider `test@directus.io`.\n2. Try to log-in using the regular login form (or the API)\n3. When using a valid email address\n\n| **APP** | **API** |\n| --- | --- |\n| ![image](https://github.com/directus/directus/assets/9389634/1da3301d-226f-46a7-bfb8-3f6fb9bc55cd) | ![image](https://github.com/directus/directus/assets/9389634/50cab310-7d1c-4241-a6be-d06542565767) |\n\n4. When using an invalid email address\n\n| **APP** | **API** |\n| --- | --- |\n| ![image](https://github.com/directus/directus/assets/9389634/7b97659e-b49c-410b-872e-e36786b6e41e) | ![image](https://github.com/directus/directus/assets/9389634/d26ccba7-bb27-437e-991e-99c10941bbe7) |\n\n5. Using this differing error it is possible to determine whether a specific email address is present in the Directus instance as an SSO user.\n\n### Workarounds\nWhen only using SSO for authentication then you can work around this issue by disabling local login using the following environment variable `AUTH_DISABLE_DEFAULT=\"true\"`\n\n### References\nImplemented as feature in https://github.com/directus/directus/pull/13184\nhttps://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/03-Identity_Management_Testing/04-Testing_for_Account_Enumeration_and_Guessable_User_Account\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "directus"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.11"
      }, {
        "fixed" : "10.13.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/directus/directus/security/advisories/GHSA-jgf4-vwc3-r46v"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-39896"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/directus/directus/commit/454cb534d6ffa547feb11f4d74b932ae7368dae2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/directus/directus"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-08T18:41:57Z",
    "nvd_published_at" : "2024-07-08T18:15:08Z"
  }
}