GitHub Advisoryadvisory · npm
GHSA-g27j-74fp-xfpr Insecure default value for CORS configuration
CRITICAL
Official page ↗
- Aliases
- CVE-2022-26969
- Ecosystem
- npm
- Packages
- directus
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- Weaknesses
- CWE-942
- Reviewed
- 2022-04-05
Affected packages
• npm directus: < 9.7.0 → fixed in 9.7.0
Description
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 [email protected]
Related
Alias · CVE (1)
- CVE-2022-26969 In Directus before 9.7.0, the default settings of CORS_ORIGIN and CORS_ENABLED are true. vulnerability
Weakness · CWE (1)
- CWE-942 Permissive Cross-domain Security Policy with Untrusted Domains weakness
References
- https://github.com/directus/directus/security/advisories/GHSA-g27j-74fp-xfpr web
- https://nvd.nist.gov/vuln/detail/CVE-2022-26969 advisory
- https://github.com/directus/directus/pull/12022 web
- https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS web
- https://github.com/directus/directus package
- https://github.com/directus/directus/blob/8daed9c41baeaf1d08c1e292bf9f0dcef65e48fb/docs/configuration/config-options.md web
- https://github.com/directus/directus/releases/tag/v9.7.0 web
- https://security.snyk.io/vuln/SNYK-JS-DIRECTUS-2441822 web