@@ -20,12 +20,7 @@ following limits is missing or set inappropriately (i.e. too low/high)
20
20
* Number of processes
21
21
* Request payload size (e.g. uploads)
22
22
* Number of requests per client/resource
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.
23
+ * Number of records per page to return in a single request response
29
24
30
25
## Example Attack Scenarios
31
26
@@ -48,15 +43,15 @@ within a few minutes.
48
43
49
44
### Scenario #3
50
45
51
- We have a MEAN stack application that contains the users list on a UI. List of
52
- users can be retrieved from the server using a following query:
53
- ` /dashboard /users?page=1&size=100` . There are limitation on maximum number of
54
- users per page (on UI side) - 200 users. An attacker changes the size parameter
55
- in order to retrieve large number of users, for example 200 000 or more and it
56
- causes performance issues. For example, load on database increases and it isn't
57
- able to handle other requests; on UI side all functionality take more time to
58
- proceed because server doesn't return required information from the DB. The same
59
- scenario might be used to provoke ` Integer Overflow ` or ` Buffer Overflow ` errors.
46
+ We have an application that contains the users' list on a UI with a limit of
47
+ ` 200 ` users per page. The users' list is retrieved from the server using the
48
+ following query: ` /api /users?page=1&size=100` . An attacker changes the ` size `
49
+ parameter to ` 200 000 ` , causing performance issues on the database. Meanwhile,
50
+ the API becomes unresponsive and unable to handle further requests from this or
51
+ any other clients (aka DoS).
52
+
53
+ The same scenario might be used to provoke Integer Overflow or Buffer Overflow
54
+ errors.
60
55
61
56
## How To Prevent
62
57
@@ -66,8 +61,9 @@ scenario might be used to provoke `Integer Overflow` or `Buffer Overflow` errors
66
61
timeframe.
67
62
* Notify the client when the limit is exceeded by providing the limit number and
68
63
the time at which the limit will be reset.
69
- * Add proper validation for query string parameters and request body on the server
70
- side.
64
+ * Add proper server side validation for query string and request body
65
+ parameters, specifically the one that control the number of records to be
66
+ returned in the response.
71
67
72
68
## References
73
69
0 commit comments