SoftwareBrothers / adminjs

AdminJS is an admin panel for apps written in node.js
https://adminjs.co
MIT License
8.15k stars 659 forks source link

[Bug]: DDoS via the /edit endpoint #1685

Open nostalgiaz opened 1 month ago

nostalgiaz commented 1 month ago

Contact Details

No response

What happened?

This is a vulnerability that stems from a lack of validation of the nested parameters.

How to reproduce:

Check the server shell: this is what I get.

<--- Last few GCs --->

[25778:0x158008000]    64915 ms: Scavenge 3898.2 (3976.8) -> 3895.0 (3982.6) MB, 15.92 / 0.00 ms  (average mu = 0.385, current mu = 0.281) allocation failure;
[25778:0x158008000]    72272 ms: Mark-Compact 4477.8 (4556.4) -> 4091.3 (4185.1) MB, 6399.42 / 0.00 ms  (average mu = 0.251, current mu = 0.172) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----

image image

Demo repo: https://github.com/nostalgiaz/adminjs-ddos

Bug prevalence

On specific a request

AdminJS dependencies version

What browsers do you see the problem on?

Firefox, Chrome, Safari, Microsoft Edge

Relevant log output

No response

Relevant code that's giving you issues

No response