Lucene search

K
osvGoogleOSV:GHSA-P8V3-M643-4XQX
HistoryMay 13, 2024 - 7:40 p.m.

Directus allows redacted data extraction on the API through "alias"

2024-05-1319:40:08
Google
osv.dev
7
directus
api
extraction
redacted data
alias
vulnerability

4.9 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

HIGH

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

6.7 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

9.2%

Summary

A user with permission to view any collection using redacted hashed fields can get access the raw stored version using the alias functionality on the API.
Normally, these redacted fields will return ********** however if we change the request to ?alias[workaround]=redacted we can instead retrieve the plain text value for the field.

Steps to reproduce

  • Set up a simple role with read-access to users.
  • Create a new user with the role from the previous step
  • Assign a password to the user

The easiest way to confirm this vulnerability is by first visiting /users/me. You should be presented with a redacted JSON-object.
Next, visit /users/me?alias[hash]=password. This time, the returned JSON object will included the raw password hash instead of the redacted value.

Workaround

This can be avoided by removing permission to view the sensitive fields entirely from users or roles that should not be able to see them.

CPENameOperatorVersion
directuslt10.11.0

4.9 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

HIGH

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

HIGH

Integrity Impact

NONE

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N

6.7 Medium

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

9.2%

Related for OSV:GHSA-P8V3-M643-4XQX