If your organization runs Directus with AI integrations (OpenAI, Anthropic, Google), any authenticated user or service account with read access to directus_revisions or flow logs can steal your AI provider API keys in plaintext — right now, without any exploitation complexity. Upgrade to Directus 11.17.0 immediately and rotate every AI API key, user token, and 2FA secret that was stored while running an affected version. Treat this as a credential breach response until keys are confirmed rotated.
Risk Assessment
Despite a CVSS of 6.5 (Medium), the practical risk is higher for AI-integrated deployments. The attack requires only valid low-privilege credentials — no technical expertise needed, just a SELECT query on directus_revisions. The blast radius includes account takeover (stolen tokens bypass MFA), unauthorized AI API usage (cost harvesting, data exfiltration through AI services), and lateral movement via stolen auth credentials. Organizations running Directus as a headless CMS backing AI workflows face compounded exposure: the leaked API keys grant access to external AI systems far beyond the Directus instance itself.
Affected Systems
| Package | Ecosystem | Vulnerable Range | Patched |
|---|---|---|---|
| directus | npm | < 11.17.0 | 11.17.0 |
Do you use directus? You're affected.
Severity & Risk
Recommended Action
- PATCH: Upgrade to Directus 11.17.0 immediately — this is the only complete fix.
- ROTATE CREDENTIALS: Revoke and reissue all AI provider API keys (OpenAI, Anthropic, Google) stored in Directus user profiles — assume they are compromised. Also rotate user tokens and reset 2FA secrets for all accounts.
- AUDIT: Query directus_revisions for records containing 'ai_openai_api_key', 'ai_anthropic_api_key', 'ai_google_api_key', 'token', 'tfa_secret', 'auth_data', 'credentials' to determine exposure scope and timeframe.
- REVIEW FLOW LOGS: Inspect Directus Flows execution logs for the same fields — purge sensitive entries after review.
- ACCESS REVIEW: Identify all accounts with read access to directus_revisions and directus_flows_operation and audit their activity logs.
- DETECTION: Alert on anomalous API usage for any rotated keys during the investigation window.
Classification
Compliance Impact
This CVE is relevant to:
Technical Details
NVD Description
### Summary Directus stores revision records (in `directus_revisions`) whenever items are created or updated. Due to the revision snapshot code not consistently calling the `prepareDelta` sanitization pipeline, sensitive fields (including user tokens, two-factor authentication secrets, external auth identifiers, auth data, stored credentials, and AI provider API keys) could be stored in plaintext within revision records. Additionally, the same sensitive fields were missing from the redaction list used when Directus Flows logged operation payloads involving the `directus_users` collection. ### Impact Any user or service account with read access to `directus_revisions` (or flow logs) could retrieve values for fields that are supposed to be concealed or encrypted at rest, including: - `token`, `tfa_secret`, `external_identifier`, `auth_data`, `credentials` - `ai_openai_api_key`, `ai_anthropic_api_key`, `ai_google_api_key`, `ai_openai_compatible_api_key` This could lead to account takeover (via stolen tokens or 2FA secrets) or unauthorized use of third-party API keys stored against users. ### Affected code paths 1. **Item create/update revisions** The data (snapshot) field written to directus_revisions was not processed through prepareDelta, so concealed/encrypted fields were stored without redaction. Relational fields were also included, which should have been excluded. 2. **Authentication service** When a user was auto-suspended after repeated failed login attempts, the revision record was created with the raw user object (including all sensitive fields) rather than the sanitized delta. 3. **Flows** The payload redaction list used when writing flow logs was missing `token`, `tfa_secret`, `external_identifier`, `auth_data`, `credentials`, and the AI API key fields, causing these to be written unredacted into flow execution data.
Exploitation Scenario
A low-privilege internal user or compromised service account authenticates to Directus and queries: SELECT snapshot FROM directus_revisions WHERE collection = 'directus_users'. The returned JSON blobs contain plaintext values for ai_openai_api_key, ai_anthropic_api_key, token, and tfa_secret for every user whose record was ever revised. The adversary extracts the OpenAI API key and immediately begins unauthorized inference calls — either for cost harvesting or to exfiltrate data via a model the victim org has fine-tuned. Simultaneously, the stolen token grants persistent API access without triggering MFA, enabling lateral movement across the Directus instance and any connected systems. The entire attack requires no special tooling, no vulnerability exploit, and leaves minimal forensic trace beyond normal API access logs.
Weaknesses (CWE)
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N References
Timeline
Related Vulnerabilities
CVE-2025-5120 10.0 smolagents: sandbox escape enables unauthenticated RCE
Same attack type: Data Leakage CVE-2025-53767 10.0 Azure OpenAI: SSRF EoP, no auth required (CVSS 10)
Same attack type: Data Extraction CVE-2025-2828 10.0 LangChain RequestsToolkit: SSRF exposes cloud metadata
Same attack type: Data Extraction CVE-2023-3765 10.0 MLflow: path traversal allows arbitrary file read
Same attack type: Data Leakage CVE-2026-21858 10.0 n8n: Input Validation flaw enables exploitation
Same attack type: Data ExtractionWeekly CISO Take + top threats
Get the week's most critical AI security threats delivered weekly. Free, no spam.
AI Threat Alert