CVE-2022-26969: Directus Insecure Default Value For CORS Vulnerability
CRITICALCVE-2022-26969 is a CRITICAL (CVSS 9.8) insecure default value for cors vulnerability (CWE-942: Permissive Cross-domain Security Policy with Untrusted Domains) affecting Directus libraries in the npm ecosystem. The issue involves insecure default value for cors configuration. Remediation is available by upgrading affected packages to version 9.7.0.
CVE-2022-26969 at a Glance
Security Impact
CVSS: 9.8
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:H/A:H).
How to Fix CVE-2022-26969
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.
npm install directus@9.7.0
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-2022-26969, 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 9.7.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-942: Permissive Cross-domain Security Policy with Untrusted Domains, where the product uses a web-client protection mechanism such as a content security policy (csp) or cross-domain policy file, but the policy includes untrusted domains with which the web client is allowed to communicate. 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
CVE-2022-26969 Affected Directus Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
directus
|
npm |
< 9.7.0
|
9.7.0
|
References
Frequently Asked Questions
What is CVE-2022-26969?
Which Directus versions are affected?
What version fixes CVE-2022-26969?
Is directus affected?
What is the CVSS score of CVE-2022-26969?
What CWE is associated with CVE-2022-26969?
How can I check npm dependencies for CVE-2022-26969?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g27j-74fp-xfpr",
"modified" : "2025-04-14T22:07:39Z",
"published" : "2022-04-05T18:31:22Z",
"aliases" : [ "CVE-2022-26969" ],
"summary" : "Insecure default value for CORS configuration",
"details" : "### Impact\n\nThe default value for the `CORS_ENABLED` and `CORS_ORIGIN` configuration was set to be very permissive by default. This could lead to unauthorized access in uncontrolled environments when the configuration hasn't been changed.\n\n### Patches\n\nThe default values for CORS have been changed in https://github.com/directus/directus/pull/12022 which is released under 9.7.0\n\n### Workarounds\n\nConfigure the CORS environment variables to match your project's usage, rather than leaving them at the (permissive) defaults.\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [directus/directus](https://github.com/directus/directus)\n* Email us at [security@directus.io](mailto:security@directus.io)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "directus"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "9.7.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/directus/directus/security/advisories/GHSA-g27j-74fp-xfpr"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-26969"
}, {
"type" : "WEB",
"url" : "https://github.com/directus/directus/pull/12022"
}, {
"type" : "WEB",
"url" : "https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/directus/directus"
}, {
"type" : "WEB",
"url" : "https://github.com/directus/directus/blob/8daed9c41baeaf1d08c1e292bf9f0dcef65e48fb/docs/configuration/config-options.md"
}, {
"type" : "WEB",
"url" : "https://github.com/directus/directus/releases/tag/v9.7.0"
}, {
"type" : "WEB",
"url" : "https://security.snyk.io/vuln/SNYK-JS-DIRECTUS-2441822"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-942" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2022-04-05T18:31:22Z",
"nvd_published_at" : "2022-12-26T06:15:00Z"
}
}