@@ -21,6 +21,13 @@ following limits is missing or set inappropriately (i.e. too low/high)
21
21
* Request payload size (e.g. uploads)
22
22
* Number of requests per client/resource
23
23
24
+ One more issue is Improper Query String Parameters validation. It could lead to
25
+ DDoS attacks against the server. Widely spread problem is validation of such
26
+ query string parameters as ` size ` , ` page ` , .etc. Absence of limitation for max,
27
+ min values of these parameters might cause performance issues, Internal Server
28
+ Errors.
29
+
30
+
24
31
## Example Attack Scenarios
25
32
26
33
### Scenario #1
@@ -40,6 +47,18 @@ combinations using a multi-thread script, against the
40
47
` /api/system/verification-codes/{smsToken} ` endpoint to discover the right token
41
48
within a few minutes.
42
49
50
+ ### Scenario #3
51
+
52
+ We have a MEAN stack application that contains the users list on a UI. List of
53
+ users can be retrieved from the server using a following query:
54
+ ` /dashboard/users?page=1&size=100 ` . There are limitation on maximum number of
55
+ users per page (on UI side) - 200 users. An attacker changes the size parameter
56
+ in order to retrieve large number of users, for example 200 000 or more and it
57
+ causes performance issues. For example, load on database increases and it isn't
58
+ able to handle other requests; on UI side all functionality take more time to
59
+ proceed because server doesn't return required information from the DB. The same
60
+ scenario might be used to provoke ` Integer Overflow ` or ` Buffer Overflow ` errors.
61
+
43
62
## How To Prevent
44
63
45
64
* Docker makes it easy to limit [ memory] [ 1 ] , [ CPU] [ 2 ] , [ number of restarts] [ 3 ] ,
@@ -48,6 +67,8 @@ within a few minutes.
48
67
timeframe.
49
68
* Notify the client when the limit is exceeded by providing the limit number and
50
69
the time at which the limit will be reset.
70
+ * Add proper validation for query string parameters and request body on the server
71
+ side.
51
72
52
73
## References
53
74
0 commit comments