An observable difference in error messaging was found in the Directus REST API. The /items/{collection} API returns different error messages for these two cases:
The two differing error messages leak the existence of collections to users which are not authorized to access these collections.
The following response returns an error message, when requesting a collection the user is not authorized to access.
GET /items/no-access
{
"errors": [
{
"message": "You don't have permission to access collection \"no-access\" or it does not exist. Queried in root.",
"extensions": {
"reason": "You don't have permission to access collection \"no-access\" or it does not exist. Queried in root.",
"code": "FORBIDDEN"
}
}
]
}
The following response returns a different error message when requesting a collection which does not exist.
GET /items/does-not-exist
{
"errors": [
{
"message": "You don't have permission to access this.",
"extensions": {
"code": "FORBIDDEN"
}
}
]
}
The difference in errors between non-existent collections and collections blocked by permissions leak the existence of a collection to a user which is not authorized to access this object.
Sebastian Krause - Hackmanit GmbH
{
"cwe_ids": [
"CWE-203",
"CWE-209"
],
"github_reviewed": true,
"github_reviewed_at": "2025-11-13T23:07:31Z",
"nvd_published_at": "2025-11-13T22:15:52Z",
"severity": "MODERATE"
}