CVE-2025-30350: @directus/storage driver s3 Directus's S3 Assets Become Unavailable Vulnerability

MODERATE
Advisory Identifier: GHSA-rv78-qqrq-73m5
CVSS 5.3
CWE-770
Published
Advisory Summary

CVE-2025-30350 is a MODERATE (CVSS 5.3) directus's s3 assets become unavailable vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting @directus/storage driver s3 libraries in the npm ecosystem. The issue involves directus's s3 assets become unavailable after a burst of head requests. Remediation is available by upgrading affected packages to version 12.0.1, 11.5.0.

CVE-2025-30350 at a Glance

CVE Identifier CVE-2025-30350
GHSA Identifier GHSA-rv78-qqrq-73m5
Severity MODERATE
CVSS v3.1 Base Score 5.3
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product @directus/storage driver s3
Package Ecosystem npm
Published Date
Last Updated

Security Impact

CVSS: 5.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability Low (A:L)

How to Fix CVE-2025-30350

To remediate this vulnerability, upgrade all affected @directus/storage driver s3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

@directus/storage-driver-s3 fixed: 12.0.1
npm install @directus/storage-driver-s3@12.0.1
directus fixed: 11.5.0
npm install directus@11.5.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls @directus/storage-driver-s3

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2025-30350, inspect your project dependencies using npm:

npm ls @directus/storage-driver-s3

Analyze the terminal output to locate any version of @directus/storage driver s3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 12.0.1), your application is affected.

Note: The npm ls @directus/storage-driver-s3 command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In @directus/storage driver s3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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](https://github.com/smithy-lang/smithy-typescript/blob/main/packages/node-http-handler/src/node-http-handler.ts#L189) was always equal to [`STORAGE_CLOUD_MAX_SOCKETS`](https://github.com/directus/directus/blob/main/packages/storage-driver-s3/src/index.ts#L89) making it impossible to have new connections causing assets to be inaccessible. After looking into this [issue on AWS SDK](https://github.com/aws/aws-sdk-js-v3/issues/6691) I found that if the [stream is requested](https://github.com/directus/directus/blob/main/api/src/services/assets.ts#L213), it needs to be consumed otherwise will hang forever. And as can be [seen here](https://github.com/directus/directus/blob/main/api/src/controllers/assets.ts#L233-L238) the stream is not consumed. The [timeouts set here](https://github.com/directus/directus/blob/main/packages/storage-driver-s3/src/index.ts#L87-L88) 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.

CVE-2025-30350 Affected @directus/storage driver s3 Versions

2 component(s)
Fixed Versions:
12.0.111.5.0
Product / Package Ecosystem Affected Versions Fixed Version
@directus/storage-driver-s3
npm
≥ 9.22.0
< 12.0.1
12.0.1
directus
npm
≥ 9.22
< 11.5.0
11.5.0

References

Frequently Asked Questions

What is CVE-2025-30350?
CVE-2025-30350 is a security vulnerability in @directus/storage driver s3 involving Directus's S3 assets become unavailable after a burst of HEAD requests under CWE-770: Allocation of Resources Without Limits or Throttling.
Which @directus/storage driver s3 versions are affected?
Affected versions include releases prior to 12.0.1, 11.5.0 across affected packages: @directus/storage-driver-s3, directus.
What version fixes CVE-2025-30350?
Upgrading to 12.0.1, 11.5.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is @directus/storage-driver-s3 affected?
Yes, @directus/storage-driver-s3 is affected in releases prior to 12.0.1. Upgrade your dependency to 12.0.1 or later.
Is directus affected?
Yes, directus is affected in releases prior to 11.5.0. Upgrade your dependency to 11.5.0 or later.
What is the CVSS score of CVE-2025-30350?
CVE-2025-30350 has a CVSS v3.1 base score of 5.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L.
What CWE is associated with CVE-2025-30350?
CVE-2025-30350 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check npm dependencies for CVE-2025-30350?
Run the dependency tree command: 'npm ls @directus/storage-driver-s3'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rv78-qqrq-73m5",
  "modified" : "2025-03-27T03:42:04Z",
  "published" : "2025-03-26T17:20:05Z",
  "aliases" : [ "CVE-2025-30350" ],
  "summary" : "Directus's S3 assets become unavailable after a burst of HEAD requests",
  "details" : "### Summary\nThere's some tools that use Directus to sync content and assets.\nSome of those tools use HEAD method, like Shopify, to check the existence of files.\nAlthough, when making many HEAD requests at once, at some point, all assets are being served as 403.\n\n### Details\nWhen I was investigating this issue, I have found that after the burst of HEAD requests, the amount of `sockets` held on [Agent on NodeHttpHandler](https://github.com/smithy-lang/smithy-typescript/blob/main/packages/node-http-handler/src/node-http-handler.ts#L189) was always equal to [`STORAGE_CLOUD_MAX_SOCKETS`](https://github.com/directus/directus/blob/main/packages/storage-driver-s3/src/index.ts#L89) making it impossible to have new connections causing assets to be inaccessible.\n\nAfter looking into this [issue on AWS SDK](https://github.com/aws/aws-sdk-js-v3/issues/6691) I found that if the [stream is requested](https://github.com/directus/directus/blob/main/api/src/services/assets.ts#L213), it needs to be consumed otherwise will hang forever. And as can be [seen here](https://github.com/directus/directus/blob/main/api/src/controllers/assets.ts#L233-L238) the stream is not consumed.\n\nThe [timeouts set here](https://github.com/directus/directus/blob/main/packages/storage-driver-s3/src/index.ts#L87-L88)  had no noticeable effect on tests made.\n\n### PoC\nThis can be easily reproduced with the following steps:\n- setup AWS S3 storage\n- set STORAGE_CLOUD_MAX_SOCKETS: \"50\" (this value is lower than default for easier reproduction)\n- upload a file to your project\n- run this file (Replace the the file ID with the one you just uploaded):\n```ts\nimport axios from \"axios\";\n\nasync function start() {\n  Array.from({ length: 400 }, (_, i) => {\n    axios\n      .head(\n        \"http://localhost:8055/assets/e536aa35-3a81-4fa9-b856-3780584d38d8\"\n      )\n      .then(() => console.log(\"✅\"))\n      .catch((e) =>\n        console.log(\"⛔\", e.response?.status || e.code || e.message)\n      );\n  });\n}\n\nstart();\n```\n\nHere's an example:\n\nhttps://github.com/user-attachments/assets/29d65bf0-5637-478f-a215-083c2ded3753\n\n\n\n\n### Impact\nThis causes denial of assets for all policies of Directus, including Admin and Public.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@directus/storage-driver-s3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.22.0"
      }, {
        "fixed" : "12.0.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "directus"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.22"
      }, {
        "fixed" : "11.5.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/directus/directus/security/advisories/GHSA-rv78-qqrq-73m5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-30350"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/directus/directus"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-26T17:20:05Z",
    "nvd_published_at" : "2025-03-26T17:15:27Z"
  }
}