CVE-2024-45596
Session is cached for OpenID and OAuth2 if `redirect` is not used
Overview
Description
Directus is a real-time API and App dashboard for managing SQL database content. An unauthenticated user can access credentials of last authenticated user via OpenID or OAuth2 where the authentication URL did not include redirect query string. This happens because on that endpoint for both OpenId and Oauth2 Directus is using the respond middleware, which by default will try to cache GET requests that met some conditions. Although, those conditions do not include this scenario, when an unauthenticated request returns user credentials. This vulnerability is fixed in 10.13.3 and 11.1.0.
Source: OX vulnerability database
Severity
6.5 · MEDIUM
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- Required
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N
Weakness: CWE-524
Affected packages · 2
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| npm | @directus/api | <21.0.1>=22.0.0, <22.2.0 | 21.0.122.2.0 |
| npm | directus | <10.13.3>=11.0.0-rc.1, <11.1.0 | 10.13.311.1.0 |
Open a package to see all its vulnerabilities.
Operating systems
No Linux distribution reports this ID.
References
- github.com https://github.com/directus/directus
- github.com https://github.com/directus/directus/blob/main/api/src/auth/drivers/oauth2.ts#L422-L428
- github.com https://github.com/directus/directus/blob/main/api/src/auth/drivers/openid.ts#L453-L459
- github.com https://github.com/directus/directus/commit/4aace0bbe57232e38cd6a287ee475293e46dc91b
- github.com https://github.com/directus/directus/commit/769fa22797bff5a9231599883b391e013f122e52
- github.com https://github.com/directus/directus/security/advisories/GHSA-cff8-x7jv-4fm8
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2024-45596
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.