Insecure default value for CORS configuration
Impact
The 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.
Patches
The default values for CORS have been changed in https://github.com/directus/directus/pull/12022 which is released under 9.7.0
Workarounds
Configure the CORS environment variables to match your project's usage, rather than leaving them at the (permissive) defaults.
For more information
If you have any questions or comments about this advisory:
- Open an issue in directus/directus
- Email us at security@directus.io
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | directus | < 9.7.0 | 9.7.0 |
References
- https://github.com/directus/directus/security/advisories/GHSA-g27j-74fp-xfpr
- https://nvd.nist.gov/vuln/detail/CVE-2022-26969
- https://github.com/directus/directus/pull/12022
- https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
- https://github.com/directus/directus
- https://github.com/directus/directus/blob/8daed9c41baeaf1d08c1e292bf9f0dcef65e48fb/docs/configuration/config-options.md
- https://github.com/directus/directus/releases/tag/v9.7.0
- https://security.snyk.io/vuln/SNYK-JS-DIRECTUS-2441822
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H- Weakness (CWE)
CWE-942- Platform
- npm
- Package
directus- Disclosed
- 05.04.2022
- Updated
- 11.10.2026 10:22
Sources and licenses
OSV / GitHub Advisory Database - GHSA-g27j-74fp-xfpr - CC BY 4.0
Vulnerability history: directus
All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 58
- First → latest
- 04.2022 07.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 2
- High 19
- Medium 34
- Low 3
Disclosures per year
- 2022: 4
- 2023: 8
- 2024: 14
- 2025: 17
- 2026: 15
-
Insecure default value for CORS configuration this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.