CVE-2024-47822: @directus/api Access Token Exposure in Logs

@directus/api Updated 02 Oct 2025

Summary

14/04/2025
Yes i
Moderate
4.2

CVE-2024-47822: Directus inserts access token from query string into logs. Affects @directus/api versions < 21.0.0. Fixed in 21.0.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Directus is an open-source headless CMS that allows users to manage content and data through a user-friendly interface. The @directus/api package provides the backend API functionalities necessary for Directus to operate. This package is widely used for building applications that require a flexible content management system. However, it has a vulnerability that exposes sensitive access tokens in system logs, which can lead to unauthorized access and data manipulation.

Vulnerability Detail

The vulnerability arises from the fact that access tokens included in the query string are not redacted when the logging style is set to 'raw'. This means that if an attacker gains access to the logs, they could potentially retrieve these tokens, which may grant them administrative control over the Directus instance. The issue is particularly concerning for systems that do not sanitize or protect their logs adequately, as it could lead to unauthorized data access and manipulation.

How To Fix

Latest published version: 40.0.0 as of 22 Oct 2026

npm install @directus/api@40.0.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

21.0.0

This is the first release that contains the fix.

npm install @directus/api@21.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, you can change the logging style to something other than 'raw' to prevent access tokens from being logged. This can be done by setting the LOG_STYLE environment variable to 'json' or another supported format. For example: export LOG_STYLE='json'.

Conclusion

In summary, CVE-2024-47822 is a vulnerability in the @directus/api package that exposes access tokens in logs when the logging style is set to 'raw'. It is crucial to update to version 21.0.0 or later to mitigate this risk. Additionally, using Vulert can help monitor your application for such vulnerabilities in real-time.

See every vulnerability recorded for @directus/api →

Share this vulnerability

FAQ

The vulnerability has a CVSS score of 4.2, which is classified as moderate severity.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. Visit Vulert Scanner to check if your application is affected without requiring any signup.

If you cannot update the package immediately, consider changing the logging style to prevent sensitive information from being logged.

If exploited, this vulnerability could allow attackers to gain unauthorized access to your Directus instance, leading to data breaches and manipulation.

Yes, if long-lived static tokens are included in the query string, they could remain in the logs indefinitely, increasing the risk of unauthorized access.

Related vulnerabilities

Recent vulnerabilities recorded for @directus/api.

How To Fix

Latest published version: 40.0.0 as of 22 Oct 2026

npm install @directus/api@40.0.0

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

21.0.0

This is the first release that contains the fix.

npm install @directus/api@21.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback