Skip to content

Commit 7b696d8

Browse files
committed
Add SecArgumentsLimit to modsecurity.conf-recommended
1 parent 0b6bd39 commit 7b696d8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

modsecurity.conf-recommended

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ SecRequestBodyLimitAction Reject
5757
#
5858
SecRequestBodyJsonDepthLimit 512
5959

60+
# Maximum number of args allowed per request. You want to keep this
61+
# value as low as practical. The value should match that in rule 200007.
62+
SecArgumentsLimit 1000
63+
64+
# If SecArgumentsLimit has been set, you probably want to reject any
65+
# request body that has only been partly parsed. The value used in this
66+
# rule should match what was used with SecArgumentsLimit
67+
SecRule &ARGS "@ge 1000" \
68+
"id:'200007', phase:2,t:none,log,deny,status:400,msg:'Failed to fully parse request body due to large argument count',severity:2"
69+
6070
# Verify that we've correctly processed the request body.
6171
# As a rule of thumb, when failing to process a request body
6272
# you should reject the request (when deployed in blocking mode)

0 commit comments

Comments
 (0)