Skip to content

Directus is soft-locked by providing a string value to random string util

High severity GitHub Reviewed Published Jun 3, 2024 in directus/directus • Updated Jun 4, 2024

Package

npm directus (npm)

Affected versions

<= 10.11.1

Patched versions

10.11.2

Description

Describe the Bug

Providing a non-numeric length value to the random string generation utility will create a memory issue breaking the capability to generate random strings platform wide. This creates a denial of service situation where logged in sessions can no longer be refreshed as sessions depend on the capability to generate a random session ID.

To Reproduce

  1. Test if the endpoint is working and accessible, GET http://localhost:8055/utils/random/string
  2. Do a bad request GET http://localhost:8055/utils/random/string?length=foo
  3. After this all calls to GET http://localhost:8055/utils/random/string will return an empty string instead of a random string
  4. In this error situation you'll see authentication refreshes fail for the app and api.

Impact

This counts as an unauthenticated denial of service attack vector so this impacts all unpatched instances reachable over the internet.

References

@br41nslug br41nslug published to directus/directus Jun 3, 2024
Published by the National Vulnerability Database Jun 3, 2024
Published to the GitHub Advisory Database Jun 4, 2024
Reviewed Jun 4, 2024
Last updated Jun 4, 2024

Severity

High
7.5
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Weaknesses

CVE ID

CVE-2024-36128

GHSA ID

GHSA-632p-p495-25m5

Source code

Credits

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