VYPR
High severityNVD Advisory· Published Sep 10, 2024· Updated Sep 10, 2024

Directus's session is cached for OpenID and OAuth2 if `redirect` is not used

CVE-2024-45596

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.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
directusnpm
< 10.13.310.13.3
directusnpm
>= 11.0.0-rc.1, < 11.1.011.1.0
@directus/apinpm
< 21.0.121.0.1
@directus/apinpm
>= 22.0.0, < 22.2.022.2.0

Affected products

1

Patches

2
769fa22797bf

Merge commit from fork

https://github.com/directus/directusRijk van ZantenAug 30, 2024via ghsa
2 files changed · +6 0
  • api/src/middleware/respond.ts+1 0 modified
    @@ -27,6 +27,7 @@ export const respond: RequestHandler = asyncHandler(async (req, res) => {
     
     	if (
     		(req.method.toLowerCase() === 'get' || req.originalUrl?.startsWith('/graphql')) &&
    +		req.originalUrl?.startsWith('/auth') === false &&
     		env['CACHE_ENABLED'] === true &&
     		cache &&
     		!req.sanitizedQuery.export &&
    
  • .changeset/orange-suns-fry.md+5 0 added
    @@ -0,0 +1,5 @@
    +---
    +'@directus/api': patch
    +---
    +
    +Fixed an issue that could cause the response cache to misbehave
    
4aace0bbe572

Merge commit from fork

https://github.com/directus/directusRijk van ZantenAug 30, 2024via ghsa
2 files changed · +6 0
  • api/src/middleware/respond.ts+1 0 modified
    @@ -27,6 +27,7 @@ export const respond: RequestHandler = asyncHandler(async (req, res) => {
     
     	if (
     		(req.method.toLowerCase() === 'get' || req.originalUrl?.startsWith('/graphql')) &&
    +		req.originalUrl?.startsWith('/auth') === false &&
     		env['CACHE_ENABLED'] === true &&
     		cache &&
     		!req.sanitizedQuery.export &&
    
  • .changeset/orange-suns-fry.md+5 0 added
    @@ -0,0 +1,5 @@
    +---
    +'@directus/api': patch
    +---
    +
    +Fixed an issue that could cause the response cache to misbehave
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.