3.1
Low
CVSS 3.1 base
What to do
If you run directus 11.14.0 to before 12.3.0, upgrade to 12.3.0 or later.
Anyone who can reach it over the network, with a low-privilege account and no user interaction, given conditions outside the attacker's control, can read some data.Read from the CVSS 3.1 vector
To exploit it
What it gets
My analysis of this finding: root cause, the vulnerable code, the impact and the fix, in the site’s format. The official advisory of record is linked above.
| Package | Ecosystem | Vulnerable | Fixed in |
|---|---|---|---|
directus | npm | >= 11.14.0, < 12.3.0 | 12.3.0 |
Directus (versions <= 11.17.4) ships two different ways to call its AI tools: the MCP server and the AI chat route. The MCP server guards the five tools marked admin: true (collections, fields, relations, flows, operations), but the chat route does not. Any authenticated user with app_access can ask the chat endpoint to run admin tools the MCP path would refuse them, so the two entry points disagree on who is allowed to do what.
The chat route converts each requested tool into an AI SDK tool in api/src/ai/chat/utils/chat-request-tool-to-ai-sdk-tool.ts. At lines 21 to 26 it looks the tool up by name from ALL_TOOLS and wires it in, but it never reads directusTool.admin:
// api/src/ai/chat/utils/chat-request-tool-to-ai-sdk-tool.ts:21-26// looks up the tool by name from ALL_TOOLS// and builds the AI SDK tool// no check of directusTool.admin anywhere hereThe bugthe admin flag is never read on this path
The MCP server, by contrast, enforces the flag in both the listing and the execution path:
// api/src/ai/mcp/server.ts:200 (listing)
if (req.accountability?.admin !== true && tool.admin === true) continue;
// api/src/ai/mcp/server.ts:223 (execution)
if (req.accountability?.admin !== true && tool.admin === true)
throw new ForbiddenError(...);
So the same tool definitions carry an admin: true flag that one dispatcher honors and the other ignores. The flag is the intended control; the chat route simply skips it.
This is an incorrect authorization flaw (CWE-863). A non-admin user who holds app_access can drive the chat route to invoke collections, fields, relations, flows, and operations, the schema and automation tooling that Directus reserves for admins. The MCP server denies these to non-admins, which confirms the intended trust boundary and makes the chat route’s omission a genuine bypass rather than a design choice. A low privilege app_access user, with no further interaction, gains read access to the schema and flow metadata that should be admin-only. The maintainers scored the impact as limited disclosure with no integrity impact (C:L/I:N), and because the runtime run below was not completed I do not claim any write effect beyond that.
I want to be precise about what I verified. The missing check is confirmed at the code level by comparing the two dispatchers line for line. The live end-to-end run was not completed because exercising the chat route needs a configured AI provider key, so I did not capture a runtime transcript for this one. The authorization gap in the source is unambiguous; the runtime proof is the piece I flag as outstanding.
Mirror the MCP server’s guard in the chat route. After the tool lookup at line 26, reject admin tools for non-admin callers before the tool is ever handed to the model:
if (directusTool.admin && accountability.admin !== true) { throw new ForbiddenError({ reason: 'You must be an admin to access this tool', });}The fixrejects admin tools for non-admin callers
Better still, both dispatchers should share one admin-enforcement helper so the admin flag cannot be honored in one place and forgotten in another.
Sanaan Fayaz Wani (GitHub sfwani) reported this vulnerability to the directus maintainers under coordinated disclosure and is credited as a reporter in GHSA-xf86-hfpm-92xr, published 2026-10-19.
All published findings: advisory index.