Medium

Directus's S3 assets become unavailable after a burst of HEAD requests

  • Disclosed: 26.03.2025
  • Updated: 11.10.2026 10:22

Summary

There's some tools that use Directus to sync content and assets. Some of those tools use HEAD method, like Shopify, to check the existence of files. Although, when making many HEAD requests at once, at some point, all assets are being served as 403.

Details

When I was investigating this issue, I have found that after the burst of HEAD requests, the amount of sockets held on Agent on NodeHttpHandler was always equal to STORAGE_CLOUD_MAX_SOCKETS making it impossible to have new connections causing assets to be inaccessible.

After looking into this issue on AWS SDK I found that if the stream is requested, it needs to be consumed otherwise will hang forever. And as can be seen here the stream is not consumed.

The timeouts set here had no noticeable effect on tests made.

PoC

This can be easily reproduced with the following steps:

  • setup AWS S3 storage
  • set STORAGE_CLOUD_MAX_SOCKETS: "50" (this value is lower than default for easier reproduction)
  • upload a file to your project
  • run this file (Replace the the file ID with the one you just uploaded):
ts
import axios from "axios";

async function start() {
  Array.from({ length: 400 }, (_, i) => {
    axios
      .head(
        "http://localhost:8055/assets/e536aa35-3a81-4fa9-b856-3780584d38d8"
      )
      .then(() => console.log("✅"))
      .catch((e) =>
        console.log("⛔", e.response?.status || e.code || e.message)
      );
  });
}

start();

Here's an example:

https://github.com/user-attachments/assets/29d65bf0-5637-478f-a215-083c2ded3753

Impact

This causes denial of assets for all policies of Directus, including Admin and Public.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
npm package directus >= 9.22, < 11.5.0 11.5.0
npm package @directus/storage-driver-s3 >= 9.22.0, < 12.0.1 12.0.1

References

CVSS score 5.3/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Weakness (CWE)
CWE-770
Platform
npm
Package
directus, @directus/storage-driver-s3
Disclosed
26.03.2025
Updated
11.10.2026 10:22

Sources and licenses

OSV / GitHub Advisory Database - GHSA-rv78-qqrq-73m5 - CC BY 4.0

Vulnerability history: @directus/storage-driver-s3

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

Total entries
2
First → latest
03.2025 03.2025
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Medium 2

Disclosures per year

  1. 2025: 2
  2. 2026: 0
  1. Directus's S3 assets become unavailable after a burst of HEAD requests this entry
    Medium · 5.3 CVE-2025-30350 >= 9.22.0, < 12.0.1 12.0.1
  2. Medium · 5.3 CVE-2025-30225 >= 9.22.0, < 12.0.1 12.0.1

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.