Medium

Directus inserts access token from query string into logs

  • Disclosed: 14.04.2025
  • Updated: 11.10.2026 10:22

Summary

Access token from query string is not redacted and is potentially exposed in system logs which may be persisted.

Details

The access token in req.query is not redacted when the LOG_STYLE is set to raw. If these logs are not properly sanitized or protected, an attacker with access to it can potentially gain administrative control, leading to unauthorized data access and manipulation.

PoC

  1. Set LOG_LEVEL="raw" in the environment.
  2. Send a request with the access_token in the query string.
  3. Notice that the access_token in req.query is not redacted.

Impact

It impacts systems where the LOG_STYLE is set to raw. The access_token in the query could potentially be a long-lived static token. Users with impacted systems should rotate their static tokens if they were provided using query string.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package @directus/api < 21.0.0 21.0.0

References

CVSS score 4.2/10
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N
Weakness (CWE)
CWE-532
Platform
npm
Package
@directus/api
Disclosed
14.04.2025
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-vw58-ph65-6rxp - CC BY 4.0

Vulnerability history: @directus/api

All published vulnerabilities of this package (npm package), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (12) in the archive
Total entries
12
First → latest
07.2024 02.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 1
  • High 2
  • Medium 8
  • Low 1

Disclosures per year

  1. 2024: 4
  2. 2025: 6
  3. 2026: 2
Severity:
  1. Directus inserts access token from query string into logs this entry
    Medium · 4.2 CVE-2024-47822 < 21.0.0 21.0.0
  2. High · 7.5 CVE-2024-54151 >= 22.2.0, < 23.2.0 23.2.0
  3. High · 7.4 CVE-2024-45596 < 21.0.1, >= 22.0.0, < 22.2.0 21.0.1, 22.2.0

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.