Skip to content

Directus inserts access token from query string into logs

Moderate severity GitHub Reviewed Published Oct 8, 2024 in directus/directus • Updated Apr 14, 2025

Package

npm @directus/api (npm)

Affected versions

< 21.0.0

Patched versions

21.0.0

Description

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.

References

@br41nslug br41nslug published to directus/directus Oct 8, 2024
Published by the National Vulnerability Database Oct 8, 2024
Published to the GitHub Advisory Database Apr 14, 2025
Reviewed Apr 14, 2025
Last updated Apr 14, 2025

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Local
Attack complexity
Low
Privileges required
High
User interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:U/C:H/I:N/A:N

EPSS score

Exploit Prediction Scoring System (EPSS)

This score estimates the probability of this vulnerability being exploited within the next 30 days. Data provided by FIRST.
(5th percentile)

Weaknesses

CVE ID

CVE-2024-47822

GHSA ID

GHSA-vw58-ph65-6rxp

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.