├── .github └── workflows │ ├── integration.yml │ └── lint.yml ├── CONTRIBUTORS.md ├── INSTALL ├── LICENSE ├── README.md ├── plugins ├── wordpress-rule-exclusions-before.conf └── wordpress-rule-exclusions-config.conf └── tests └── regression └── wordpress-rule-exclusions-plugin ├── 9507100.yaml ├── 9507121.yaml ├── 9507139.yaml ├── 9507140.yaml ├── 9507145.yaml ├── 9507146.yaml ├── 9507147.yaml ├── 9507148.yaml ├── 9507149.yaml ├── 9507201.yaml ├── 9507202.yaml ├── 9507203.yaml ├── 9507350.yaml ├── 9507355.yaml ├── 9507720.yaml ├── 9507791.yaml ├── 9507900.yaml ├── 9507971.yaml ├── 9507972.yaml └── 9507974.yaml /.github/workflows/integration.yml: -------------------------------------------------------------------------------- 1 | --- 2 | on: [push, pull_request] 3 | name: Integration tests 4 | 5 | jobs: 6 | integration-tests: 7 | uses: coreruleset/crs-plugin-test-action/.github/workflows/integration.yaml@main 8 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | on: [push, pull_request] 3 | 4 | jobs: 5 | plugin-lint: 6 | uses: coreruleset/crs-plugin-test-action/.github/workflows/lint.yaml@main 7 | -------------------------------------------------------------------------------- /CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | # Contributors to WordPress Rule Exclusions Plugin 2 | 3 | - [agusmu](https://github.com/agusmu) 4 | - [Esad Cetiner](https://github.com/esadcetiner) 5 | - [Christian Folini](https://github.com/dune73) 6 | - [Ervin Hegedus](https://github.com/airween) 7 | - [Walter Hop](https://github.com/lifeforms) 8 | - [Max Leske](https://github.com/theseion) 9 | - [Jose Nazario](https://github.com/paralax) 10 | - [Chaim Sanders](https://github.com/csanders-git) 11 | - [Federico G. Schwindt](https://github.com/fgsch) 12 | - [siric](https://github.com/siric) 13 | - [Jozef Sudolský](https://github.com/azurit) 14 | - [Felipe Zipitría](https://github.com/fzipi) 15 | -------------------------------------------------------------------------------- /INSTALL: -------------------------------------------------------------------------------- 1 | See README.md. 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2024 the OWASP CRS contributors 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # OWASP CRS - WordPress Rule Exclusions Plugin 2 | ![Integration tests](https://github.com/coreruleset/wordpress-rule-exclusions-plugin/actions/workflows/integration.yml/badge.svg) 3 | 4 | ## Description 5 | 6 | This plugin contains rule exclusions for [WordPress](https://wordpress.org/), a content management system (CMS), so it can be run flawlessly together with 7 | OWASP CRS (CRS). 8 | 9 | This plugin only supports functionality provided with vanilla WordPress (without plugins installed). False positives that are due to WordPress plugins must be resolved with [custom rule exclusions](https://coreruleset.org/docs/concepts/false_positives_tuning/). 10 | 11 | 3rd Party themes are supported for both block based themes and classic site editor themes, however 3rd party theme plugins and builders are not supported, those must be tuned manually with a [custom rule exclusions](https://coreruleset.org/docs/concepts/false_positives_tuning/). 12 | 13 | ## Installation 14 | 15 | For full and up to date instructions for the different available plugin 16 | installation methods, refer to [How to Install a Plugin](https://coreruleset.org/docs/concepts/plugins/#how-to-install-a-plugin) 17 | in the official CRS documentation. 18 | 19 | ### Conditionally enable plugins for multi-application environments 20 | 21 | For full and up to date instructions on how to conditionally enable/disable this plugin on a multisite environment, please refer to [Conditionally enable plugins for multi-application environments](https://coreruleset.org/docs/concepts/plugins/#conditionally-enable-plugins-for-multi-application-environments) in the official CRS documentation. 22 | 23 | ## Testing 24 | 25 | After the plugin is enabled, your WordPress instance should work without any 26 | problems possibly caused by CRS (for example, false positives while blocking 27 | requests). If you are still having any problems, please file a new issue on 28 | [github](https://github.com/coreruleset/wordpress-rule-exclusions-plugin). 29 | 30 | ## License 31 | 32 | Copyright (c) 2022-2025 OWASP CRS project. All rights reserved. 33 | 34 | The OWASP CRS and its official plugins are distributed 35 | under Apache Software License (ASL) version 2. Please see the enclosed LICENSE 36 | file for full details. 37 | -------------------------------------------------------------------------------- /plugins/wordpress-rule-exclusions-before.conf: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # OWASP CRS Plugin 3 | # Copyright (c) 2022-2025 CRS project. All rights reserved. 4 | # 5 | # The OWASP CRS plugins are distributed under 6 | # Apache Software License (ASL) version 2 7 | # Please see the enclosed LICENSE file for full details. 8 | # ------------------------------------------------------------------------ 9 | 10 | # OWASP CRS Plugin 11 | # Plugin name: wordpress-rule-exclusions 12 | # Plugin description: 13 | # Rule ID block base: 9,507,000 - 9,507,999 14 | # Plugin version: 1.1.0 15 | 16 | # Documentation can be found here: 17 | # https://github.com/coreruleset/wordpress-rule-exclusions-plugin 18 | 19 | # Generic rule to disable plugin 20 | SecRule TX:wordpress-rule-exclusions-plugin_enabled "@eq 0" "id:9507099,phase:1,pass,nolog,ctl:ruleRemoveById=9507100-9507999" 21 | 22 | 23 | # These exclusions remedy false positives in a default WordPress install. 24 | # 25 | # Note that the WordPress comment field itself is currently NOT excluded 26 | # from checking. The reason is that malicious content is regularly being 27 | # posted to WordPress comment forms, and there have been various cases 28 | # of XSS and even RCE vulnerabilities exploited by WordPress comments. 29 | 30 | # 31 | # -=[ WordPress Front-End ]=- 32 | # 33 | 34 | 35 | # 36 | # [ Login form ] 37 | # 38 | 39 | # User login 40 | SecRule REQUEST_FILENAME "@endsWith /wp-login.php" \ 41 | "id:9507100,\ 42 | phase:1,\ 43 | pass,\ 44 | t:none,\ 45 | nolog,\ 46 | ctl:ruleRemoveTargetById=932236;ARGS_NAMES:pwd,\ 47 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pwd,\ 48 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 49 | 50 | # Redirect for wp-login/wp-admin 51 | SecRule REQUEST_FILENAME "@rx /wp-(?:login|admin/admin-ajax)\.php$" \ 52 | "id:9507101,\ 53 | phase:1,\ 54 | pass,\ 55 | t:none,\ 56 | nolog,\ 57 | ctl:ruleRemoveTargetById=920230;ARGS:redirect_to,\ 58 | ctl:ruleRemoveTargetById=931130;ARGS:redirect_to,\ 59 | ctl:ruleRemoveTargetById=942430;ARGS:redirect_to,\ 60 | ctl:ruleRemoveTargetById=942431;ARGS:redirect_to,\ 61 | ctl:ruleRemoveTargetById=942432;ARGS:redirect_to,\ 62 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 63 | 64 | # Reset password 65 | SecRule REQUEST_FILENAME "@endsWith /wp-login.php" \ 66 | "id:9507120,\ 67 | phase:2,\ 68 | pass,\ 69 | t:none,\ 70 | nolog,\ 71 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 72 | chain" 73 | SecRule ARGS:action "@streq resetpass" \ 74 | "t:none,\ 75 | chain" 76 | SecRule &ARGS:action "@eq 1" \ 77 | "t:none,\ 78 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pass1,\ 79 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pass1-text,\ 80 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pass2" 81 | 82 | # User Login 83 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 84 | "id:9507121,\ 85 | phase:1,\ 86 | pass,\ 87 | t:none,\ 88 | nolog,\ 89 | ctl:ruleRemoveTargetById=932236;ARGS_NAMES:pwd,\ 90 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pwd,\ 91 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 92 | 93 | # 94 | # [ Comments ] 95 | # 96 | 97 | # Post comment 98 | SecRule REQUEST_FILENAME "@endsWith /wp-comments-post.php" \ 99 | "id:9507130,\ 100 | phase:1,\ 101 | pass,\ 102 | t:none,\ 103 | nolog,\ 104 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:author,\ 105 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:comment,\ 106 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:email,\ 107 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:url,\ 108 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 109 | 110 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/comment.php" \ 111 | "id:9507131,\ 112 | phase:1,\ 113 | pass,\ 114 | t:none,\ 115 | nolog,\ 116 | ctl:ruleRemoveTargetById=931130;ARGS:newcomment_author_url,\ 117 | ctl:ruleRemoveTargetByTag=attack-sqli;ARGS:newcomment_author_url,\ 118 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:content,\ 119 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:newcomment_author,\ 120 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 121 | 122 | # Replying to a comment 123 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 124 | "id:9507132,\ 125 | phase:2,\ 126 | pass,\ 127 | t:none,\ 128 | nolog,\ 129 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 130 | chain" 131 | SecRule ARGS:action "@streq replyto-comment" \ 132 | "t:none,\ 133 | chain" 134 | SecRule &ARGS:action "@eq 1" \ 135 | "t:none,\ 136 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:content" 137 | 138 | 139 | # 140 | # [ Gutenberg Editor ] 141 | # Used when a user (auto)saves a post/page with Gutenberg. 142 | # 143 | 144 | # Editing global styles for a theme (colors, fonts, etc) 145 | SecRule REQUEST_FILENAME "@rx /wp-json/wp/v[0-9]/global-styles/[0-9]+$" \ 146 | "id:9507139,\ 147 | phase:1,\ 148 | pass,\ 149 | t:none,\ 150 | nolog,\ 151 | ctl:ruleRemoveTargetById=932220;ARGS,\ 152 | ctl:ruleRemoveTargetById=932235;ARGS,\ 153 | ctl:ruleRemoveTargetById=932236;ARGS,\ 154 | ctl:ruleRemoveTargetById=942100;ARGS,\ 155 | ctl:ruleRemoveTargetById=942430;ARGS,\ 156 | ctl:ruleRemoveTargetById=942431;ARGS,\ 157 | ctl:ruleRemoveTargetById=942432;ARGS,\ 158 | ctl:ruleRemoveTargetById=942440;ARGS,\ 159 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 160 | 161 | # Gutenberg 162 | SecRule REQUEST_FILENAME "@rx /wp-json/wp/v[0-9]+/(?:navigation|pages|posts|template-parts|templates)" \ 163 | "id:9507140,\ 164 | phase:1,\ 165 | pass,\ 166 | t:none,\ 167 | nolog,\ 168 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:content,\ 169 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.content,\ 170 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 171 | 172 | # Gutenberg via rest_route for sites without pretty permalinks 173 | SecRule REQUEST_FILENAME "@endsWith /index.php" \ 174 | "id:9507141,\ 175 | phase:2,\ 176 | pass,\ 177 | t:none,\ 178 | nolog,\ 179 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 180 | chain" 181 | SecRule &ARGS:rest_route "@eq 1" \ 182 | "t:none,\ 183 | nolog,\ 184 | chain" 185 | SecRule ARGS:rest_route "@rx ^/wp/v[0-9]+/(?:posts|pages|widget-types|tags|templates|users)" \ 186 | "t:none,\ 187 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:content,\ 188 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.content,\ 189 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:search,\ 190 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.search,\ 191 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:name,\ 192 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.name,\ 193 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:excerpt,\ 194 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.excerpt,\ 195 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:instance.raw.text,\ 196 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:json.instance.raw.text" 197 | 198 | # Gutenberg upload image/media 199 | SecRule REQUEST_FILENAME "@rx /wp-json/wp/v[0-9]+/media" \ 200 | "id:9507142,\ 201 | phase:1,\ 202 | pass,\ 203 | t:none,\ 204 | nolog,\ 205 | ctl:ruleRemoveById=200002,\ 206 | ctl:ruleRemoveById=200004,\ 207 | ctl:ruleRemoveTargetById=920120;FILES:file,\ 208 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 209 | 210 | # Gutenberg upload image/media via rest_route for sites without pretty permalinks 211 | SecRule REQUEST_FILENAME "@endsWith /index.php" \ 212 | "id:9507143,\ 213 | phase:2,\ 214 | pass,\ 215 | t:none,\ 216 | nolog,\ 217 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 218 | chain" 219 | SecRule &ARGS:rest_route "@eq 1" \ 220 | "t:none,\ 221 | nolog,\ 222 | chain" 223 | SecRule ARGS:rest_route "@rx ^/wp/v[0-9]+/media" \ 224 | "t:none,\ 225 | ctl:ruleRemoveById=200002,\ 226 | ctl:ruleRemoveById=200004" 227 | 228 | # Editing a page/post with gutenberg editor 229 | SecRule REQUEST_FILENAME "@endsWith /index.php" \ 230 | "id:9507144,\ 231 | phase:1,\ 232 | pass,\ 233 | t:none,\ 234 | nolog,\ 235 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 236 | chain" 237 | SecRule REQUEST_HEADERS:x-http-method-override "@streq PUT" \ 238 | "t:none,\ 239 | ctl:ruleRemoveById=920450" 240 | 241 | # Gutenberg full site editor (v6.3.1+). 242 | # Requests can contain CSS data, which are detected by libinjection. 243 | # Uses an additional chain rule to prevent evasion by supplying another 244 | # argument with the same name. 245 | SecRule REQUEST_FILENAME "@endsWith /index.php" \ 246 | "id:9507145,\ 247 | phase:2,\ 248 | pass,\ 249 | t:none,\ 250 | nolog,\ 251 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 252 | chain" 253 | SecRule &ARGS:rest_route "@eq 1" \ 254 | "t:none,\ 255 | nolog,\ 256 | chain" 257 | SecRule ARGS:rest_route "@rx ^/wp/v[0-9]+/global-styles/[0-9]+$" \ 258 | "t:none,\ 259 | ctl:ruleRemoveTargetById=942100;ARGS" 260 | 261 | # Cannot update page|post in WordPress due to `x-http-method-override` header. 262 | SecRule REQUEST_FILENAME "@rx /wp-json/wp/v[0-9]+/(?:global-styles|navigation|pages|posts|sidebars|template-parts|templates|users)" \ 263 | "id:9507146,\ 264 | phase:1,\ 265 | pass,\ 266 | t:none,\ 267 | nolog,\ 268 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 269 | chain" 270 | SecRule &REQUEST_HEADERS:x-http-method-override "!@eq 0" \ 271 | "t:none,\ 272 | ctl:ruleRemoveById=920450" 273 | 274 | # Loading tags/catagories for pages/posts 275 | # Obtaining metadata for pages/posts 276 | # Loading in comments for pages/posts 277 | SecRule REQUEST_FILENAME "@endsWith /index.php" \ 278 | "id:9507147,\ 279 | phase:2,\ 280 | pass,\ 281 | t:none,\ 282 | nolog,\ 283 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 284 | chain" 285 | SecRule ARGS:_fields "@rx ^id[a-z,_]*$" \ 286 | "t:none,\ 287 | ctl:ruleRemoveTargetById=932236;ARGS:_fields" 288 | 289 | # Editing site in full site Gutenberg editor 290 | SecRule REQUEST_FILENAME "@endsWith /index.php" \ 291 | "id:9507148,\ 292 | phase:2,\ 293 | pass,\ 294 | t:none,\ 295 | nolog,\ 296 | chain" 297 | SecRule ARGS:orderby "@streq id" \ 298 | "t:none,\ 299 | ctl:ruleRemoveTargetById=932236;ARGS:orderby" 300 | 301 | # Adding hyperlinks in Gutenberg editor 302 | SecRule REQUEST_FILENAME "@endsWith /index.php" \ 303 | "id:9507149,\ 304 | phase:2,\ 305 | pass,\ 306 | t:none,\ 307 | nolog,\ 308 | chain" 309 | SecRule ARGS:rest_route "@rx ^/wp-block-editor/v[0-9]/url-details$" \ 310 | "t:none,\ 311 | ctl:ruleRemoveTargetById=931130;ARGS:url" 312 | 313 | # 314 | # [ Live preview ] 315 | # Used when an administrator customizes the site and previews the result 316 | # as a normal user. 317 | # 318 | 319 | # Theme select 320 | # Example: wp_customize=on&theme=twentyfifteen&customized= 321 | # {"old_sidebars_widgets_data":{"wp_inactive_widgets":[], 322 | # "sidebar-1":["search-2","recent-posts-2","recent-comments-2", 323 | # "archives-2","categories-2","meta-2"]}}&nonce=XXX& 324 | # customize_messenger_channel=preview-0 325 | SecRule ARGS:wp_customize "@streq on" \ 326 | "id:9507150,\ 327 | phase:2,\ 328 | pass,\ 329 | t:none,\ 330 | nolog,\ 331 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 332 | chain" 333 | SecRule &ARGS:action "@eq 0" \ 334 | "t:none,\ 335 | ctl:ruleRemoveTargetById=942200;ARGS:customized,\ 336 | ctl:ruleRemoveTargetById=942260;ARGS:customized,\ 337 | ctl:ruleRemoveTargetById=942300;ARGS:customized,\ 338 | ctl:ruleRemoveTargetById=942330;ARGS:customized,\ 339 | ctl:ruleRemoveTargetById=942340;ARGS:customized,\ 340 | ctl:ruleRemoveTargetById=942370;ARGS:customized,\ 341 | ctl:ruleRemoveTargetById=942430;ARGS:customized,\ 342 | ctl:ruleRemoveTargetById=942431;ARGS:customized,\ 343 | ctl:ruleRemoveTargetById=942460;ARGS:customized" 344 | 345 | # Appearance -> Widgets -> Live Preview 346 | SecRule ARGS:wp_customize "@streq on" \ 347 | "id:9507160,\ 348 | phase:2,\ 349 | pass,\ 350 | t:none,\ 351 | nolog,\ 352 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 353 | chain" 354 | SecRule ARGS:action "@rx ^(?:customize_save|update-widget)$" \ 355 | "t:none,\ 356 | chain" 357 | SecRule &ARGS:action "@eq 1" \ 358 | "t:none,\ 359 | ctl:ruleRemoveTargetById=942200;ARGS:customized,\ 360 | ctl:ruleRemoveTargetById=942260;ARGS:customized,\ 361 | ctl:ruleRemoveTargetById=942300;ARGS:customized,\ 362 | ctl:ruleRemoveTargetById=942330;ARGS:customized,\ 363 | ctl:ruleRemoveTargetById=942340;ARGS:customized,\ 364 | ctl:ruleRemoveTargetById=942370;ARGS:customized,\ 365 | ctl:ruleRemoveTargetById=942430;ARGS:customized,\ 366 | ctl:ruleRemoveTargetById=942431;ARGS:customized,\ 367 | ctl:ruleRemoveTargetById=942460;ARGS:customized,\ 368 | ctl:ruleRemoveTargetById=920230;ARGS:partials,\ 369 | ctl:ruleRemoveTargetById=941320;ARGS:partials,\ 370 | ctl:ruleRemoveTargetById=942180;ARGS:partials,\ 371 | ctl:ruleRemoveTargetById=942200;ARGS:partials,\ 372 | ctl:ruleRemoveTargetById=942260;ARGS:partials,\ 373 | ctl:ruleRemoveTargetById=942330;ARGS:partials,\ 374 | ctl:ruleRemoveTargetById=942340;ARGS:partials,\ 375 | ctl:ruleRemoveTargetById=942370;ARGS:partials,\ 376 | ctl:ruleRemoveTargetById=942430;ARGS:partials,\ 377 | ctl:ruleRemoveTargetById=942431;ARGS:partials,\ 378 | ctl:ruleRemoveTargetById=942460;ARGS:partials" 379 | 380 | # Self calls to wp-cron.php?doing_wp_cron=[timestamp] 381 | # These requests may be missing Accept, Content-Length headers. 382 | # This rule must run in phase:1. 383 | SecRule REQUEST_FILENAME "@endsWith /wp-cron.php" \ 384 | "id:9507200,\ 385 | phase:1,\ 386 | pass,\ 387 | t:none,\ 388 | nolog,\ 389 | ctl:ruleRemoveById=920180,\ 390 | ctl:ruleRemoveById=920300,\ 391 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 392 | 393 | # Modifying widgets under Appearance --> Widgets 394 | # Rules are disabled for all args because the paramater name keeps on changing 395 | SecRule REQUEST_FILENAME "@rx /wp-json/batch/v[0-9]$" \ 396 | "id:9507201,\ 397 | phase:2,\ 398 | pass,\ 399 | t:none,\ 400 | nolog,\ 401 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 402 | chain" 403 | SecRule ARGS:_locale "@streq user" \ 404 | "t:none,\ 405 | ctl:ruleRemoveTargetById=920272;ARGS,\ 406 | ctl:ruleRemoveTargetById=920273;ARGS,\ 407 | ctl:ruleRemoveTargetById=932200;ARGS,\ 408 | ctl:ruleRemoveTargetById=932236;ARGS,\ 409 | ctl:ruleRemoveTargetById=932240;ARGS,\ 410 | ctl:ruleRemoveTargetById=932370;ARGS,\ 411 | ctl:ruleRemoveTargetById=941150;ARGS,\ 412 | ctl:ruleRemoveTargetById=941180;ARGS,\ 413 | ctl:ruleRemoveTargetById=941181;ARGS,\ 414 | ctl:ruleRemoveTargetById=941320;ARGS,\ 415 | ctl:ruleRemoveTargetById=941330;ARGS,\ 416 | ctl:ruleRemoveTargetById=942130;ARGS,\ 417 | ctl:ruleRemoveTargetById=942131;ARGS,\ 418 | ctl:ruleRemoveTargetById=942200;ARGS,\ 419 | ctl:ruleRemoveTargetById=942210;ARGS,\ 420 | ctl:ruleRemoveTargetById=942260;ARGS,\ 421 | ctl:ruleRemoveTargetById=942330;ARGS,\ 422 | ctl:ruleRemoveTargetById=942340;ARGS,\ 423 | ctl:ruleRemoveTargetById=942370;ARGS,\ 424 | ctl:ruleRemoveTargetById=942430;ARGS,\ 425 | ctl:ruleRemoveTargetById=942431;ARGS,\ 426 | ctl:ruleRemoveTargetById=942432;ARGS,\ 427 | ctl:ruleRemoveTargetById=942440;ARGS,\ 428 | ctl:ruleRemoveTargetById=942460;ARGS,\ 429 | ctl:ruleRemoveTargetById=942520;ARGS,\ 430 | ctl:ruleRemoveTargetById=920272;REQUEST_BODY,\ 431 | ctl:ruleRemoveTargetById=920273;REQUEST_BODY" 432 | 433 | # Previewing changes made to site via customizer 434 | SecRule ARGS:wp_customize "@streq on" \ 435 | "id:9507202,\ 436 | phase:2,\ 437 | pass,\ 438 | t:none,\ 439 | nolog,\ 440 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 441 | chain" 442 | SecRule &ARGS:wp_customize "@eq 1" \ 443 | "t:none,\ 444 | ctl:ruleRemoveTargetById=920273;ARGS:customize_autosaved,\ 445 | ctl:ruleRemoveTargetById=942432;ARGS:customize_changeset_uuid,\ 446 | ctl:ruleRemoveTargetById=920273;ARGS:partials,\ 447 | ctl:ruleRemoveTargetById=932200;ARGS:partials,\ 448 | ctl:ruleRemoveTargetById=932240;ARGS:partials,\ 449 | ctl:ruleRemoveTargetById=942370;ARGS:partials,\ 450 | ctl:ruleRemoveTargetById=942430;ARGS:partials,\ 451 | ctl:ruleRemoveTargetById=942431;ARGS:partials,\ 452 | ctl:ruleRemoveTargetById=942432;ARGS:partials,\ 453 | ctl:ruleRemoveTargetById=942460;ARGS:partials,\ 454 | ctl:ruleRemoveTargetById=942520;ARGS:partials,\ 455 | ctl:ruleRemoveTargetById=920272;REQUEST_BODY,\ 456 | ctl:ruleRemoveTargetById=920273;REQUEST_BODY,\ 457 | ctl:ruleRemoveTargetById=921180;TX:paramcounter_ARGS_NAMES:customized,\ 458 | ctl:ruleRemoveTargetById=921180;TX:paramcounter_ARGS_NAMES:customize_changeset_uuid,\ 459 | ctl:ruleRemoveTargetById=921180;TX:paramcounter_ARGS_NAMES:customize_theme,\ 460 | ctl:ruleRemoveTargetById=921180;TX:paramcounter_ARGS_NAMES:customize_autosaved,\ 461 | ctl:ruleRemoveTargetById=921180;TX:paramcounter_ARGS_NAMES:customize_messenger_channel,\ 462 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:customized" 463 | 464 | # Saving changes made via site customizer 465 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 466 | "id:9507203,\ 467 | phase:2,\ 468 | pass,\ 469 | t:none,\ 470 | nolog,\ 471 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 472 | chain" 473 | SecRule ARGS:wp_customize "@streq on" \ 474 | "t:none,\ 475 | chain" 476 | SecRule &ARGS:wp_customize "@eq 1" \ 477 | "t:none,\ 478 | ctl:ruleRemoveTargetById=942432;ARGS:customize_changeset_uuid,\ 479 | ctl:ruleRemoveTargetById=920272;REQUEST_BODY,\ 480 | ctl:ruleRemoveTargetById=920273;REQUEST_BODY,\ 481 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:changes,\ 482 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:customized,\ 483 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:customize_changeset_data,\ 484 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:data" 485 | 486 | # Opening site customizer 487 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/customize.php" \ 488 | "id:9507204,\ 489 | phase:4,\ 490 | pass,\ 491 | t:none,\ 492 | nolog,\ 493 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 494 | chain" 495 | SecRule RESPONSE_BODY "@contains Invalid date." \ 496 | "t:none,\ 497 | chain" 498 | SecRule REQUEST_METHOD "@streq GET" \ 499 | "t:none,\ 500 | ctl:ruleRemoveById=953101" 501 | 502 | # 503 | # [ Cookies ] 504 | 505 | # WP Session Manager 506 | # Cookie: _wp_session=[hex]||[timestamp]||[timestamp] 507 | # detected SQLi using libinjection with fingerprint 'n&1' 508 | SecRule REQUEST_COOKIES:_wp_session "@rx ^[0-9a-f]+\|\|\d+\|\|\d+$" \ 509 | "id:9507300,\ 510 | phase:1,\ 511 | pass,\ 512 | t:none,\ 513 | nolog,\ 514 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 515 | chain" 516 | SecRule &REQUEST_COOKIES:_wp_session "@eq 1" \ 517 | "t:none,\ 518 | ctl:ruleRemoveTargetById=942100;REQUEST_COOKIES:_wp_session" 519 | 520 | # 521 | # [ General exclusions ] 522 | # 523 | 524 | # Operator @unconditionalMatch is used instead of a SecAction because of a bug 525 | # in ModSecurity v3 which prevents SecActions to be removed using ctl action. 526 | # _wp_http_referer and wp_http_referer are passed on a lot of wp-admin pages. 527 | # _wp_http_referer and wp_http_referer tend to contain very similar data, it's 528 | # recommended to keep the disabled rules in sync between these parameters. 529 | SecRule REQUEST_FILENAME "@unconditionalMatch" \ 530 | "id:9507350,\ 531 | phase:1,\ 532 | pass,\ 533 | t:none,\ 534 | nolog,\ 535 | ctl:ruleRemoveTargetById=932236;ARGS:nonce,\ 536 | ctl:ruleRemoveTargetById=942450;ARGS:nonce,\ 537 | ctl:ruleRemoveTargetById=932236;ARGS:ver,\ 538 | ctl:ruleRemoveTargetById=942450;ARGS:ver,\ 539 | ctl:ruleRemoveTargetById=920230;ARGS:_wp_http_referer,\ 540 | ctl:ruleRemoveTargetById=920273;ARGS:_wp_http_referer,\ 541 | ctl:ruleRemoveTargetById=931130;ARGS:_wp_http_referer,\ 542 | ctl:ruleRemoveTargetById=932150;ARGS:_wp_http_referer,\ 543 | ctl:ruleRemoveTargetById=932200;ARGS:_wp_http_referer,\ 544 | ctl:ruleRemoveTargetById=932235;ARGS:_wp_http_referer,\ 545 | ctl:ruleRemoveTargetById=932236;ARGS:_wp_http_referer,\ 546 | ctl:ruleRemoveTargetById=932370;ARGS:_wp_http_referer,\ 547 | ctl:ruleRemoveTargetById=941100;ARGS:_wp_http_referer,\ 548 | ctl:ruleRemoveTargetById=942120;ARGS:_wp_http_referer,\ 549 | ctl:ruleRemoveTargetById=942130;ARGS:_wp_http_referer,\ 550 | ctl:ruleRemoveTargetById=942200;ARGS:_wp_http_referer,\ 551 | ctl:ruleRemoveTargetById=942230;ARGS:_wp_http_referer,\ 552 | ctl:ruleRemoveTargetById=942260;ARGS:_wp_http_referer,\ 553 | ctl:ruleRemoveTargetById=942430;ARGS:_wp_http_referer,\ 554 | ctl:ruleRemoveTargetById=942431;ARGS:_wp_http_referer,\ 555 | ctl:ruleRemoveTargetById=942432;ARGS:_wp_http_referer,\ 556 | ctl:ruleRemoveTargetById=942440;ARGS:_wp_http_referer,\ 557 | ctl:ruleRemoveTargetById=920230;ARGS:wp_http_referer,\ 558 | ctl:ruleRemoveTargetById=920273;ARGS:wp_http_referer,\ 559 | ctl:ruleRemoveTargetById=931130;ARGS:wp_http_referer,\ 560 | ctl:ruleRemoveTargetById=932150;ARGS:wp_http_referer,\ 561 | ctl:ruleRemoveTargetById=932200;ARGS:wp_http_referer,\ 562 | ctl:ruleRemoveTargetById=932235;ARGS:wp_http_referer,\ 563 | ctl:ruleRemoveTargetById=932236;ARGS:wp_http_referer,\ 564 | ctl:ruleRemoveTargetById=932370;ARGS:wp_http_referer,\ 565 | ctl:ruleRemoveTargetById=941100;ARGS:wp_http_referer,\ 566 | ctl:ruleRemoveTargetById=942120;ARGS:wp_http_referer,\ 567 | ctl:ruleRemoveTargetById=942130;ARGS:wp_http_referer,\ 568 | ctl:ruleRemoveTargetById=942200;ARGS:wp_http_referer,\ 569 | ctl:ruleRemoveTargetById=942230;ARGS:wp_http_referer,\ 570 | ctl:ruleRemoveTargetById=942260;ARGS:wp_http_referer,\ 571 | ctl:ruleRemoveTargetById=942430;ARGS:wp_http_referer,\ 572 | ctl:ruleRemoveTargetById=942431;ARGS:wp_http_referer,\ 573 | ctl:ruleRemoveTargetById=942432;ARGS:wp_http_referer,\ 574 | ctl:ruleRemoveTargetById=942440;ARGS:wp_http_referer,\ 575 | ctl:ruleRemoveTargetById=932236;ARGS:_wpnonce,\ 576 | ctl:ruleRemoveTargetById=942450;ARGS:_wpnonce,\ 577 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 578 | 579 | 580 | # `_wp_original_http_referer` and `referredby` are used by the "Classic-Editor" plugin. 581 | # While we usually don't support plugins, this plugin restores previously existing 582 | # core functionality. 583 | SecRule ARGS_NAMES "@rx ^_wp_original_http_referer|referredby$" \ 584 | "id:9507355,\ 585 | phase:2,\ 586 | pass,\ 587 | t:none,\ 588 | nolog,\ 589 | ctl:ruleRemoveTargetById=920273;ARGS:_wp_original_http_referer,\ 590 | ctl:ruleRemoveTargetById=932235;ARGS:_wp_original_http_referer,\ 591 | ctl:ruleRemoveTargetById=932236;ARGS:_wp_original_http_referer,\ 592 | ctl:ruleRemoveTargetById=942120;ARGS:_wp_original_http_referer,\ 593 | ctl:ruleRemoveTargetById=942430;ARGS:_wp_original_http_referer,\ 594 | ctl:ruleRemoveTargetById=942431;ARGS:_wp_original_http_referer,\ 595 | ctl:ruleRemoveTargetById=942432;ARGS:_wp_original_http_referer,\ 596 | ctl:ruleRemoveTargetById=920273;ARGS:referredby,\ 597 | ctl:ruleRemoveTargetById=932235;ARGS:referredby,\ 598 | ctl:ruleRemoveTargetById=932236;ARGS:referredby,\ 599 | ctl:ruleRemoveTargetById=942120;ARGS:referredby,\ 600 | ctl:ruleRemoveTargetById=942430;ARGS:referredby,\ 601 | ctl:ruleRemoveTargetById=942431;ARGS:referredby,\ 602 | ctl:ruleRemoveTargetById=942432;ARGS:referredby,\ 603 | ctl:ruleRemoveTargetById=920273;ARGS_NAMES:_wp_original_http_referer,\ 604 | ctl:ruleRemoveTargetById=920273;ARGS_NAMES:referredby,\ 605 | ctl:ruleRemoveTargetById=920273;REQUEST_BODY,\ 606 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 607 | 608 | 609 | # 610 | # -=[ WordPress Administration Back-End (wp-admin) ]=- 611 | # 612 | 613 | # Skip this section for performance unless /wp-admin/ is in filename 614 | 615 | SecRule REQUEST_FILENAME "!@contains /wp-admin/" \ 616 | "id:9507400,\ 617 | phase:1,\ 618 | pass,\ 619 | t:none,\ 620 | nolog,\ 621 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 622 | skipAfter:END-WORDPRESS-ADMIN" 623 | 624 | SecRule REQUEST_FILENAME "!@contains /wp-admin/" \ 625 | "id:9507401,\ 626 | phase:2,\ 627 | pass,\ 628 | t:none,\ 629 | nolog,\ 630 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 631 | skipAfter:END-WORDPRESS-ADMIN" 632 | 633 | 634 | # 635 | # [ Installation ] 636 | # 637 | 638 | # WordPress installation: exclude database password 639 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/setup-config.php" \ 640 | "id:9507410,\ 641 | phase:2,\ 642 | pass,\ 643 | t:none,\ 644 | nolog,\ 645 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 646 | chain" 647 | SecRule ARGS:step "@streq 2" \ 648 | "t:none,\ 649 | chain" 650 | SecRule &ARGS:step "@eq 1" \ 651 | "t:none,\ 652 | ctl:ruleRemoveTargetById=932260;ARGS_NAMES:uname,\ 653 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pwd" 654 | 655 | # WordPress installation: exclude admin password 656 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/install.php" \ 657 | "id:9507420,\ 658 | phase:2,\ 659 | pass,\ 660 | t:none,\ 661 | nolog,\ 662 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 663 | chain" 664 | SecRule ARGS:step "@streq 2" \ 665 | "t:none,\ 666 | chain" 667 | SecRule &ARGS:step "@eq 1" \ 668 | "t:none,\ 669 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:admin_password,\ 670 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:admin_password2,\ 671 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pass1-text" 672 | 673 | 674 | # 675 | # [ User management ] 676 | # 677 | 678 | # Modifying a user's profile 679 | SecRule REQUEST_FILENAME "@rx /wp-admin/(?:profile|user-edit)\.php$" \ 680 | "id:9507520,\ 681 | phase:2,\ 682 | pass,\ 683 | t:none,\ 684 | nolog,\ 685 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 686 | chain" 687 | SecRule ARGS:action "@streq update" \ 688 | "t:none,\ 689 | chain" 690 | SecRule &ARGS:action "@eq 1" \ 691 | "t:none,\ 692 | ctl:ruleRemoveTargetById=931130;ARGS:url,\ 693 | ctl:ruleRemoveTargetById=931130;ARGS:facebook,\ 694 | ctl:ruleRemoveTargetById=931130;ARGS:instagram,\ 695 | ctl:ruleRemoveTargetById=931130;ARGS:linkedin,\ 696 | ctl:ruleRemoveTargetById=931130;ARGS:myspace,\ 697 | ctl:ruleRemoveTargetById=931130;ARGS:pinterest,\ 698 | ctl:ruleRemoveTargetById=931130;ARGS:soundcloud,\ 699 | ctl:ruleRemoveTargetById=931130;ARGS:tumblr,\ 700 | ctl:ruleRemoveTargetById=931130;ARGS:youtube,\ 701 | ctl:ruleRemoveTargetById=931130;ARGS:wikipedia,\ 702 | ctl:ruleRemoveTargetById=931130;ARGS:github,\ 703 | ctl:ruleRemoveTargetById=931130;ARGS:tiktok,\ 704 | ctl:ruleRemoveTargetById=931130;ARGS:vkontakte,\ 705 | ctl:ruleRemoveTargetById=931130;ARGS:medium,\ 706 | ctl:ruleRemoveTargetById=931130;ARGS:twitter,\ 707 | ctl:ruleRemoveTargetById=931130;ARGS:tsf-user-meta[facebook_page],\ 708 | ctl:ruleRemoveTargetById=931130;ARGS:odnoklassniki,\ 709 | ctl:ruleRemoveTargetById=931130;ARGS:vimeo,\ 710 | ctl:ruleRemoveTargetById=931130;ARGS:dribbble,\ 711 | ctl:ruleRemoveTargetById=931130;ARGS:wordpress,\ 712 | ctl:ruleRemoveTargetByTag=attack-sqli;ARGS:url,\ 713 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:description,\ 714 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:first_name,\ 715 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:last_name,\ 716 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pass1,\ 717 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pass1-text,\ 718 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pass2" 719 | 720 | # Create user 721 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/user-new.php" \ 722 | "id:9507540,\ 723 | phase:2,\ 724 | pass,\ 725 | t:none,\ 726 | nolog,\ 727 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 728 | chain" 729 | SecRule ARGS:action "@streq createuser" \ 730 | "t:none,\ 731 | chain" 732 | SecRule &ARGS:action "@eq 1" \ 733 | "t:none,\ 734 | ctl:ruleRemoveTargetById=931130;ARGS:url,\ 735 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pass1,\ 736 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pass1-text,\ 737 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:pass2" 738 | 739 | # The ID variable is used all over wordpress 740 | # Managing users 741 | SecRule REQUEST_FILENAME "@rx /wp-admin/(?:admin|admin-ajax|edit|users)\.php$" \ 742 | "id:9507601,\ 743 | phase:1,\ 744 | pass,\ 745 | t:none,\ 746 | nolog,\ 747 | ctl:ruleRemoveTargetById=932236;ARGS_NAMES:id,\ 748 | ctl:ruleRemoveTargetById=932236;ARGS_NAMES:ids,\ 749 | ctl:ruleRemoveTargetById=920273;ARGS_NAMES:users[0],\ 750 | ctl:ruleRemoveTargetById=942432;ARGS_NAMES:users[0],\ 751 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 752 | 753 | # 754 | # [ Content editing ] 755 | # 756 | 757 | # Edit posts and pages 758 | # /wp-admin/post.php, /wp-admin/post.php?t=[timestamp] 759 | # - Themes do not properly escape post_title in HTML, so beware of XSS 760 | # and be conservative in excluding this parameter. 761 | # - Parameter _wp_http_referer can appear multiple times. 762 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/post.php" \ 763 | "id:9507700,\ 764 | phase:2,\ 765 | pass,\ 766 | t:none,\ 767 | nolog,\ 768 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 769 | chain" 770 | SecRule ARGS:action "@rx ^(?:edit|editpost)$" \ 771 | "t:none,\ 772 | chain" 773 | SecRule &ARGS:action "@eq 1" \ 774 | "t:none,\ 775 | ctl:ruleRemoveTargetByTag=attack-sqli;ARGS:post_title,\ 776 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:content,\ 777 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:excerpt,\ 778 | ctl:ruleRemoveById=920272,\ 779 | ctl:ruleRemoveById=921180" 780 | 781 | # Autosave posts and pages 782 | # ARGS_NAMES:data[wp-check-locked-posts][] can appear multiple times 783 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 784 | "id:9507710,\ 785 | phase:2,\ 786 | pass,\ 787 | t:none,\ 788 | nolog,\ 789 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 790 | chain" 791 | SecRule ARGS:action "@streq heartbeat" \ 792 | "t:none,\ 793 | chain" 794 | SecRule &ARGS:action "@eq 1" \ 795 | "t:none,\ 796 | ctl:ruleRemoveTargetByTag=attack-sqli;ARGS:data[wp_autosave][post_title],\ 797 | ctl:ruleRemoveTargetByTag=attack-xss;ARGS:data[wp_autosave][post_title],\ 798 | ctl:ruleRemoveTargetById=932110;ARGS:data[wp_autosave][post_title],\ 799 | ctl:ruleRemoveTargetById=932150;ARGS:data[wp_autosave][post_title],\ 800 | ctl:ruleRemoveTargetById=941270;ARGS:data[wp_autosave][post_title],\ 801 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:data[wp_autosave][content],\ 802 | ctl:ruleRemoveTargetByTag=attack-xss;ARGS:data[wp_autosave][excerpt],\ 803 | ctl:ruleRemoveTargetById=921110;ARGS:data[wp_autosave][excerpt],\ 804 | ctl:ruleRemoveTargetById=932105;ARGS:data[wp_autosave][excerpt],\ 805 | ctl:ruleRemoveTargetById=932110;ARGS:data[wp_autosave][excerpt],\ 806 | ctl:ruleRemoveTargetById=932115;ARGS:data[wp_autosave][excerpt],\ 807 | ctl:ruleRemoveTargetById=933210;ARGS:data[wp_autosave][excerpt],\ 808 | ctl:ruleRemoveTargetById=942131;ARGS:data[wp_autosave][excerpt],\ 809 | ctl:ruleRemoveTargetById=942431;ARGS_NAMES:data[wp-refresh-post-lock][post_id],\ 810 | ctl:ruleRemoveTargetById=942431;ARGS_NAMES:data[wp-refresh-post-lock][lock],\ 811 | ctl:ruleRemoveTargetById=942431;ARGS_NAMES:data[wp-check-locked-posts][],\ 812 | ctl:ruleRemoveById=921180,\ 813 | ctl:ruleRemoveById=920272" 814 | 815 | # Edit menus 816 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/nav-menus.php" \ 817 | "id:9507720,\ 818 | phase:2,\ 819 | pass,\ 820 | t:none,\ 821 | nolog,\ 822 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 823 | chain" 824 | SecRule ARGS:action "@rx ^(?:update|edit)$" \ 825 | "t:none,\ 826 | chain" 827 | SecRule &ARGS:action "@le 2" \ 828 | "t:none,\ 829 | ctl:ruleRemoveTargetById=920273;ARGS,\ 830 | ctl:ruleRemoveTargetById=931130;ARGS,\ 831 | ctl:ruleRemoveTargetById=932150;ARGS,\ 832 | ctl:ruleRemoveTargetById=932200;ARGS,\ 833 | ctl:ruleRemoveTargetById=941130;ARGS,\ 834 | ctl:ruleRemoveTargetById=942100;ARGS,\ 835 | ctl:ruleRemoveTargetById=920273;ARGS_NAMES,\ 836 | ctl:ruleRemoveTargetById=921220;ARGS_NAMES,\ 837 | ctl:ruleRemoveTargetById=942432;ARGS_NAMES,\ 838 | ctl:ruleRemoveTargetById=942460;ARGS:menu-name,\ 839 | ctl:ruleRemoveTargetById=932240;ARGS:nav-menu-data,\ 840 | ctl:ruleRemoveTargetById=941330;ARGS:nav-menu-data,\ 841 | ctl:ruleRemoveTargetById=941340;ARGS:nav-menu-data,\ 842 | ctl:ruleRemoveTargetById=942200;ARGS:nav-menu-data,\ 843 | ctl:ruleRemoveTargetById=942260;ARGS:nav-menu-data,\ 844 | ctl:ruleRemoveTargetById=942330;ARGS:nav-menu-data,\ 845 | ctl:ruleRemoveTargetById=942340;ARGS:nav-menu-data,\ 846 | ctl:ruleRemoveTargetById=942370;ARGS:nav-menu-data,\ 847 | ctl:ruleRemoveTargetById=942430;ARGS:nav-menu-data,\ 848 | ctl:ruleRemoveTargetById=942431;ARGS:nav-menu-data,\ 849 | ctl:ruleRemoveTargetById=942432;ARGS:nav-menu-data,\ 850 | ctl:ruleRemoveTargetById=942460;ARGS:nav-menu-data,\ 851 | ctl:ruleRemoveTargetById=942490;ARGS:nav-menu-data,\ 852 | ctl:ruleRemoveTargetById=942520;ARGS:nav-menu-data,\ 853 | ctl:ruleRemoveTargetById=920272;REQUEST_BODY,\ 854 | ctl:ruleRemoveTargetById=920273;REQUEST_BODY,\ 855 | ctl:ruleRemoveTargetById=921180;TX:paramcounter_ARGS_NAMES:action,\ 856 | ctl:ruleRemoveTargetById=921180;TX:paramcounter_ARGS_NAMES:menu" 857 | 858 | # Edit text widgets (can contain custom HTML) 859 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 860 | "id:9507730,\ 861 | phase:2,\ 862 | pass,\ 863 | t:none,\ 864 | nolog,\ 865 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 866 | chain" 867 | SecRule ARGS:action "@rx ^(?:save-widget|update-widget)$" \ 868 | "t:none,\ 869 | chain" 870 | SecRule &ARGS:action "@eq 1" \ 871 | "t:none,\ 872 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[0][text],\ 873 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[1][text],\ 874 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[2][text],\ 875 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[3][text],\ 876 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[4][text],\ 877 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[5][text],\ 878 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[6][text],\ 879 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[7][text],\ 880 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[8][text],\ 881 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[9][text],\ 882 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[10][text],\ 883 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[11][text],\ 884 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[12][text],\ 885 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[13][text],\ 886 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[14][text],\ 887 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[15][text],\ 888 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[16][text],\ 889 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[17][text],\ 890 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[18][text],\ 891 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[19][text],\ 892 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[20][text],\ 893 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[21][text],\ 894 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[22][text],\ 895 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[23][text],\ 896 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[24][text],\ 897 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[25][text],\ 898 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[26][text],\ 899 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[27][text],\ 900 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[28][text],\ 901 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[29][text],\ 902 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[30][text],\ 903 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[31][text],\ 904 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[32][text],\ 905 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[33][text],\ 906 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[34][text],\ 907 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[35][text],\ 908 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[36][text],\ 909 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[37][text],\ 910 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[38][text],\ 911 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:widget-text[39][text]" 912 | 913 | # Reorder widgets 914 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 915 | "id:9507740,\ 916 | phase:2,\ 917 | pass,\ 918 | t:none,\ 919 | nolog,\ 920 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 921 | chain" 922 | SecRule ARGS:action "@streq widgets-order" \ 923 | "t:none,\ 924 | chain" 925 | SecRule &ARGS:action "@eq 1" \ 926 | "t:none,\ 927 | ctl:ruleRemoveTargetById=942430;ARGS:sidebars[sidebar-1],\ 928 | ctl:ruleRemoveTargetById=942431;ARGS:sidebars[sidebar-1],\ 929 | ctl:ruleRemoveTargetById=942430;ARGS:sidebars[sidebar-2],\ 930 | ctl:ruleRemoveTargetById=942431;ARGS:sidebars[sidebar-2],\ 931 | ctl:ruleRemoveTargetById=942430;ARGS:sidebars[sidebar-3],\ 932 | ctl:ruleRemoveTargetById=942431;ARGS:sidebars[sidebar-3],\ 933 | ctl:ruleRemoveTargetById=942430;ARGS:sidebars[sidebar-4],\ 934 | ctl:ruleRemoveTargetById=942431;ARGS:sidebars[sidebar-4],\ 935 | ctl:ruleRemoveTargetById=942430;ARGS:sidebars[sidebar-5],\ 936 | ctl:ruleRemoveTargetById=942431;ARGS:sidebars[sidebar-5],\ 937 | ctl:ruleRemoveTargetById=942430;ARGS:sidebars[sidebar-6],\ 938 | ctl:ruleRemoveTargetById=942431;ARGS:sidebars[sidebar-6],\ 939 | ctl:ruleRemoveTargetById=942430;ARGS:sidebars[sidebar-7],\ 940 | ctl:ruleRemoveTargetById=942431;ARGS:sidebars[sidebar-7]" 941 | 942 | # Create permalink sample for new post 943 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 944 | "id:9507750,\ 945 | phase:2,\ 946 | pass,\ 947 | t:none,\ 948 | nolog,\ 949 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 950 | chain" 951 | SecRule ARGS:action "@streq sample-permalink" \ 952 | "t:none,\ 953 | chain" 954 | SecRule &ARGS:action "@eq 1" \ 955 | "t:none,\ 956 | ctl:ruleRemoveTargetByTag=attack-sqli;ARGS:new_title,\ 957 | ctl:ruleRemoveTargetById=941270;ARGS:new_title" 958 | 959 | # Add external link to menu 960 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 961 | "id:9507760,\ 962 | phase:2,\ 963 | pass,\ 964 | t:none,\ 965 | nolog,\ 966 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 967 | chain" 968 | SecRule ARGS:action "@streq add-menu-item" \ 969 | "t:none,\ 970 | chain" 971 | SecRule &ARGS:action "@eq 1" \ 972 | "t:none,\ 973 | ctl:ruleRemoveTargetById=931130;ARGS:menu-item[-1][menu-item-url]" 974 | 975 | # Editor: Add Media, Insert Media, Insert into page 976 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 977 | "id:9507770,\ 978 | phase:2,\ 979 | pass,\ 980 | t:none,\ 981 | nolog,\ 982 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 983 | chain" 984 | SecRule ARGS:action "@streq send-attachment-to-editor" \ 985 | "t:none,\ 986 | chain" 987 | SecRule &ARGS:action "@eq 1" \ 988 | "t:none,\ 989 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:html" 990 | 991 | # Add a tag 992 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 993 | "id:9507780,\ 994 | phase:2,\ 995 | pass,\ 996 | t:none,\ 997 | nolog,\ 998 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 999 | chain" 1000 | SecRule ARGS:action "@streq add-tag" \ 1001 | "t:none,\ 1002 | chain" 1003 | SecRule &ARGS:action "@eq 1" \ 1004 | "t:none,\ 1005 | ctl:ruleRemoveTargetByTag=attack-xss;ARGS:description" 1006 | 1007 | # Upload media 1008 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/async-upload.php" \ 1009 | "id:9507790,\ 1010 | phase:2,\ 1011 | pass,\ 1012 | t:none,\ 1013 | nolog,\ 1014 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1015 | chain" 1016 | SecRule ARGS:action "@streq upload-attachment" \ 1017 | "t:none,\ 1018 | chain" 1019 | SecRule &ARGS:action "@eq 1" \ 1020 | "t:none,\ 1021 | ctl:ruleRemoveTargetById=920120;FILES:async-upload,\ 1022 | ctl:ruleRemoveTargetById=933210;ARGS:name,\ 1023 | ctl:ruleRemoveTargetById=942100;ARGS:name" 1024 | 1025 | # Modify media 1026 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 1027 | "id:9507791,\ 1028 | phase:2,\ 1029 | pass,\ 1030 | t:none,\ 1031 | nolog,\ 1032 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1033 | chain" 1034 | SecRule ARGS:action "@streq save-attachment" \ 1035 | "t:none,\ 1036 | chain" 1037 | SecRule &ARGS:action "@eq 1" \ 1038 | "t:none,\ 1039 | ctl:ruleRemoveTargetById=932100;ARGS:changes[caption],\ 1040 | ctl:ruleRemoveTargetById=941100;ARGS:changes[caption],\ 1041 | ctl:ruleRemoveTargetById=941160;ARGS:changes[caption],\ 1042 | ctl:ruleRemoveTargetById=932130;ARGS:changes[smush],\ 1043 | ctl:ruleRemoveTargetById=941310;ARGS:changes[smush],\ 1044 | ctl:ruleRemoveTargetByTag=attack-xss;ARGS:changes[compat][item],\ 1045 | ctl:ruleRemoveTargetById=932130;ARGS:changes[compat][item],\ 1046 | ctl:ruleRemoveTargetById=933210;ARGS:changes[compat][item]" 1047 | 1048 | # 1049 | # [ Options and Settings ] 1050 | # 1051 | 1052 | # Change site URL 1053 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/options.php" \ 1054 | "id:9507800,\ 1055 | phase:2,\ 1056 | pass,\ 1057 | t:none,\ 1058 | nolog,\ 1059 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1060 | chain" 1061 | SecRule ARGS:option_page "@streq general" \ 1062 | "t:none,\ 1063 | chain" 1064 | SecRule &ARGS:option_page "@eq 1" \ 1065 | "t:none,\ 1066 | chain" 1067 | SecRule ARGS:action "@streq update" \ 1068 | "t:none,\ 1069 | chain" 1070 | SecRule &ARGS:action "@eq 1" \ 1071 | "t:none,\ 1072 | ctl:ruleRemoveTargetById=931130;ARGS:home,\ 1073 | ctl:ruleRemoveTargetById=931130;ARGS:siteurl" 1074 | 1075 | # Permalink settings 1076 | # permalink_structure=/index.php/%year%/%monthnum%/%day%/%postname%/ 1077 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/options-permalink.php" \ 1078 | "id:9507810,\ 1079 | phase:1,\ 1080 | pass,\ 1081 | t:none,\ 1082 | nolog,\ 1083 | ctl:ruleRemoveTargetById=920230;ARGS:selection,\ 1084 | ctl:ruleRemoveTargetById=920272;ARGS:selection,\ 1085 | ctl:ruleRemoveTargetById=942431;ARGS:selection,\ 1086 | ctl:ruleRemoveTargetById=920230;ARGS:permalink_structure,\ 1087 | ctl:ruleRemoveTargetById=920272;ARGS:permalink_structure,\ 1088 | ctl:ruleRemoveTargetById=942100;ARGS:permalink_structure,\ 1089 | ctl:ruleRemoveTargetById=942130;ARGS:tag_base,\ 1090 | ctl:ruleRemoveTargetById=942130;ARGS:category_base,\ 1091 | ctl:ruleRemoveTargetById=942130;ARGS:permalink_structure,\ 1092 | ctl:ruleRemoveTargetById=942180;ARGS:permalink_structure,\ 1093 | ctl:ruleRemoveTargetById=942330;ARGS:permalink_structure,\ 1094 | ctl:ruleRemoveTargetById=942390;ARGS:permalink_structure,\ 1095 | ctl:ruleRemoveTargetById=942390;ARGS:category_base,\ 1096 | ctl:ruleRemoveTargetById=942390;ARGS:tag_base,\ 1097 | ctl:ruleRemoveTargetById=942431;ARGS:permalink_structure,\ 1098 | ctl:ruleRemoveTargetById=942521;ARGS:permalink_structure,\ 1099 | ctl:ruleRemoveTargetById=920272;REQUEST_BODY,\ 1100 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 1101 | 1102 | # Comments deny list and moderation list 1103 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/options.php" \ 1104 | "id:9507820,\ 1105 | phase:2,\ 1106 | pass,\ 1107 | t:none,\ 1108 | nolog,\ 1109 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1110 | chain" 1111 | SecRule ARGS:option_page "@streq discussion" \ 1112 | "t:none,\ 1113 | chain" 1114 | SecRule &ARGS:option_page "@eq 1" \ 1115 | "t:none,\ 1116 | chain" 1117 | SecRule ARGS:action "@streq update" \ 1118 | "t:none,\ 1119 | chain" 1120 | SecRule &ARGS:action "@eq 1" \ 1121 | "t:none,\ 1122 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:disallowed_keys,\ 1123 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:blacklist_keys,\ 1124 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:moderation_keys" 1125 | 1126 | # Posts/pages overview search 1127 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/edit.php" \ 1128 | "id:9507830,\ 1129 | phase:1,\ 1130 | pass,\ 1131 | t:none,\ 1132 | nolog,\ 1133 | ctl:ruleRemoveTargetById=932236;ARGS_NAMES:cat,\ 1134 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:s,\ 1135 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 1136 | 1137 | 1138 | # 1139 | # [ Helpers ] 1140 | # 1141 | 1142 | # /wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common, 1143 | # admin-bar,wp-ajax-response,jquery-color,wp-lists,quicktags, 1144 | # jquery-query,admin-comments,svg-painter,heartbeat,&load%5B%5D= 1145 | # wp-auth-check,wp-a11y,wplink,jquery-ui-core,jquery-ui-widget, 1146 | # jquery-ui-position,jquery-ui-menu,jquery-ui-autocomplete&ver=4.6.1 1147 | # 1148 | # /wp-admin/load-styles.php?c=0&dir=ltr&load%5B%5D=dashicons, 1149 | # admin-bar,buttons,media-views,common,forms,admin-menu,dashboard, 1150 | # list-tables,edit,revisions,media,themes,about,nav-menu&load%5B%5D= 1151 | # s,widgets,site-icon,l10n,wp-auth-check&ver=4.6.1 1152 | # 1153 | # /wp-admin/load-scripts.php?c=0&load%5B%5D=hoverIntent,common, 1154 | # admin-bar,jquery-ui-widget,jquery-ui-position,wp-pointer, 1155 | # wp-ajax-response,jquery-color,wp-lists,quicktags, 1156 | # jqu&load%5B%5D=ery-query,admin-comments,jquery-ui-core, 1157 | # jquery-ui-mouse,jquery-ui-sortable,postbox,dashboard,underscore, 1158 | # customize-base,customize&load%5B%5D=-loader,thickbox,plugin-install, 1159 | # wp-util,wp-a11y,updates,shortcode,media-upload,svg-painter, 1160 | # jquery-ui-accordion&ver=3f9999390861a0133beda3ee8acf152e 1161 | SecRule REQUEST_FILENAME "@rx /wp-admin/load-(?:scripts|styles)\.php$" \ 1162 | "id:9507900,\ 1163 | phase:1,\ 1164 | pass,\ 1165 | t:none,\ 1166 | nolog,\ 1167 | ctl:ruleRemoveById=921180,\ 1168 | ctl:ruleRemoveTargetById=920273;ARGS_NAMES:load[],\ 1169 | ctl:ruleRemoveTargetById=921220;ARGS_NAMES:load[],\ 1170 | ctl:ruleRemoveTargetById=942432;ARGS_NAMES:load[],\ 1171 | ctl:ruleRemoveTargetById=920273;ARGS_NAMES:load[chunk_0],\ 1172 | ctl:ruleRemoveTargetById=921220;ARGS_NAMES:load[chunk_0],\ 1173 | ctl:ruleRemoveTargetById=942432;ARGS_NAMES:load[chunk_0],\ 1174 | ctl:ruleRemoveTargetById=920273;ARGS_NAMES:load[chunk_1],\ 1175 | ctl:ruleRemoveTargetById=921220;ARGS_NAMES:load[chunk_1],\ 1176 | ctl:ruleRemoveTargetById=942432;ARGS_NAMES:load[chunk_1],\ 1177 | ctl:ruleRemoveTargetById=920273;ARGS_NAMES:load[chunk_2],\ 1178 | ctl:ruleRemoveTargetById=921220;ARGS_NAMES:load[chunk_2],\ 1179 | ctl:ruleRemoveTargetById=942432;ARGS_NAMES:load[chunk_2],\ 1180 | ctl:ruleRemoveTargetById=920273;ARGS_NAMES:load[chunk_3],\ 1181 | ctl:ruleRemoveTargetById=921220;ARGS_NAMES:load[chunk_3],\ 1182 | ctl:ruleRemoveTargetById=942432;ARGS_NAMES:load[chunk_3],\ 1183 | ctl:ruleRemoveTargetById=932236;ARGS:load[],\ 1184 | ctl:ruleRemoveTargetById=942360;ARGS:load[],\ 1185 | ctl:ruleRemoveTargetById=942430;ARGS:load[],\ 1186 | ctl:ruleRemoveTargetById=942431;ARGS:load[],\ 1187 | ctl:ruleRemoveTargetById=942432;ARGS:load[],\ 1188 | ctl:ruleRemoveTargetById=932236;ARGS:load[chunk_0],\ 1189 | ctl:ruleRemoveTargetById=942360;ARGS:load[chunk_0],\ 1190 | ctl:ruleRemoveTargetById=942430;ARGS:load[chunk_0],\ 1191 | ctl:ruleRemoveTargetById=942431;ARGS:load[chunk_0],\ 1192 | ctl:ruleRemoveTargetById=942432;ARGS:load[chunk_0],\ 1193 | ctl:ruleRemoveTargetById=932236;ARGS:load[chunk_1],\ 1194 | ctl:ruleRemoveTargetById=942360;ARGS:load[chunk_1],\ 1195 | ctl:ruleRemoveTargetById=942430;ARGS:load[chunk_1],\ 1196 | ctl:ruleRemoveTargetById=942431;ARGS:load[chunk_1],\ 1197 | ctl:ruleRemoveTargetById=942432;ARGS:load[chunk_1],\ 1198 | ctl:ruleRemoveTargetById=932236;ARGS:load[chunk_2],\ 1199 | ctl:ruleRemoveTargetById=942360;ARGS:load[chunk_2],\ 1200 | ctl:ruleRemoveTargetById=942430;ARGS:load[chunk_2],\ 1201 | ctl:ruleRemoveTargetById=942431;ARGS:load[chunk_2],\ 1202 | ctl:ruleRemoveTargetById=942432;ARGS:load[chunk_2],\ 1203 | ctl:ruleRemoveTargetById=932236;ARGS:load[chunk_3],\ 1204 | ctl:ruleRemoveTargetById=942360;ARGS:load[chunk_3],\ 1205 | ctl:ruleRemoveTargetById=942430;ARGS:load[chunk_3],\ 1206 | ctl:ruleRemoveTargetById=942431;ARGS:load[chunk_3],\ 1207 | ctl:ruleRemoveTargetById=942432;ARGS:load[chunk_3],\ 1208 | ctl:ruleRemoveTargetById=920100;REQUEST_LINE,\ 1209 | ver:'wordpress-rule-exclusions-plugin/1.1.0'" 1210 | 1211 | # Wordpress Site Health 1212 | # The wordpress site health page makes use of embedded SQL/PHP 1213 | # which triggers PHP/SQL leak rules. 1214 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/site-health.php" \ 1215 | "id:9507910,\ 1216 | phase:1,\ 1217 | pass,\ 1218 | t:none,\ 1219 | nolog,\ 1220 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1221 | chain" 1222 | SecRule REQUEST_METHOD "@streq GET" \ 1223 | "t:none,\ 1224 | ctl:ruleRemoveById=951220,\ 1225 | ctl:ruleRemoveById=953110" 1226 | 1227 | 1228 | # 1229 | # [ Plugins management ] 1230 | # 1231 | 1232 | # Updating or deleting a plugin 1233 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 1234 | "id:9507950,\ 1235 | phase:2,\ 1236 | pass,\ 1237 | t:none,\ 1238 | nolog,\ 1239 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1240 | chain" 1241 | SecRule ARGS:action "@rx ^(?:update-plugin|delete-plugin)$" \ 1242 | "t:none,\ 1243 | chain" 1244 | SecRule &ARGS:action "@eq 1" \ 1245 | "t:none,\ 1246 | ctl:ruleRemoveTargetById=932120;ARGS:plugin,\ 1247 | ctl:ruleRemoveTargetById=932120;ARGS:slug" 1248 | 1249 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 1250 | "id:9507970,\ 1251 | phase:2,\ 1252 | pass,\ 1253 | t:none,\ 1254 | nolog,\ 1255 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1256 | chain" 1257 | SecRule ARGS:action "@streq edit-theme-plugin-file" \ 1258 | "t:none,\ 1259 | chain" 1260 | SecRule &ARGS:action "@eq 1" \ 1261 | "t:none,\ 1262 | ctl:ruleRemoveTargetByTag=OWASP_CRS;ARGS:newcontent" 1263 | 1264 | # Opening the plugins page 1265 | # Exclusion of rule 951240 together with test 9507971-4 can be removed after we drop 1266 | # support for CRS 3. 1267 | SecRule REQUEST_FILENAME "@rx /wp-admin/(?:plugins|plugin-install)\.php$" \ 1268 | "id:9507971,\ 1269 | phase:1,\ 1270 | pass,\ 1271 | t:none,\ 1272 | nolog,\ 1273 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1274 | ctl:ruleRemoveTargetById=951230;RESPONSE_BODY,\ 1275 | ctl:ruleRemoveTargetById=951240;RESPONSE_BODY,\ 1276 | ctl:ruleRemoveTargetById=953100;RESPONSE_BODY,\ 1277 | ctl:ruleRemoveTargetById=953110;RESPONSE_BODY,\ 1278 | ctl:ruleRemoveTargetById=953101;RESPONSE_BODY" 1279 | 1280 | # Search for plugins 1281 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/admin-ajax.php" \ 1282 | "id:9507972,\ 1283 | phase:2,\ 1284 | pass,\ 1285 | t:none,\ 1286 | nolog,\ 1287 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1288 | chain" 1289 | SecRule ARGS:action "@streq search-install-plugins" \ 1290 | "t:none,\ 1291 | chain" 1292 | SecRule &ARGS:action "@eq 1" \ 1293 | "t:none,\ 1294 | ctl:ruleRemoveTargetById=942360;ARGS:s" 1295 | 1296 | # Uploading plugins as a zip file 1297 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/update.php" \ 1298 | "id:9507973,\ 1299 | phase:2,\ 1300 | pass,\ 1301 | t:none,\ 1302 | nolog,\ 1303 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1304 | chain" 1305 | SecRule ARGS:action "@streq upload-plugin" \ 1306 | "t:none,\ 1307 | chain" 1308 | SecRule FILES:pluginzip "@endsWith .zip" \ 1309 | "t:none,\ 1310 | ctl:ruleRemoveTargetById=944110;REQUEST_BODY,\ 1311 | ctl:ruleRemoveTargetById=944250;REQUEST_BODY" 1312 | 1313 | # Installing a plugin via zip file upload 1314 | SecRule REQUEST_FILENAME "@endsWith /wp-admin/update.php" \ 1315 | "id:9507974,\ 1316 | phase:1,\ 1317 | pass,\ 1318 | t:none,\ 1319 | nolog,\ 1320 | ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 1321 | ctl:ruleRemoveTargetById=932236;ARGS:install-plugin-submit" 1322 | 1323 | SecMarker "END-WORDPRESS-ADMIN" 1324 | -------------------------------------------------------------------------------- /plugins/wordpress-rule-exclusions-config.conf: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------ 2 | # OWASP CRS Plugin 3 | # Copyright (c) 2022-2025 CRS project. All rights reserved. 4 | # 5 | # The OWASP CRS plugins are distributed under 6 | # Apache Software License (ASL) version 2 7 | # Please see the enclosed LICENSE file for full details. 8 | # ------------------------------------------------------------------------ 9 | 10 | # OWASP CRS Plugin 11 | # Plugin name: wordpress-rule-exclusions 12 | # Plugin description: 13 | # Rule ID block base: 9,507,000 - 9,507,999 14 | # Plugin version: 1.1.0 15 | 16 | # Generic rule to disable the plugin 17 | # 18 | # Plugins are enabled by default. 19 | # 20 | # They become active by placing them in the plugin folder. It is possible to 21 | # control plugin activation via setting a variable. This can be done in the 22 | # plugin config file here. 23 | # 24 | # The predefined variable name is meant to be "-plugin_enabled". 25 | # For the wordpress-rule-exclusions-plugin, this means it can be disabled by setting 26 | # tx.wordpress-rule-exclusions-plugin_enabled=0. 27 | # 28 | # Note that a global setting of this variable overrides the setting here. 29 | # That means the "enabled" variable is only set by this rule if it has not 30 | # been set before. 31 | # 32 | # Feel free to set the variable unconditionally here by replacing the 33 | # SecRule line with an unconditional SecAction statement. 34 | # 35 | # SecRule &TX:wordpress-rule-exclusions-plugin_enabled "@eq 0" \ 36 | # "id:9507010,\ 37 | # phase:1,\ 38 | # pass,\ 39 | # nolog,\ 40 | # ver:'wordpress-rule-exclusions-plugin/1.1.0',\ 41 | # setvar:'tx.wordpress-rule-exclusions-plugin_enabled=0'" 42 | -------------------------------------------------------------------------------- /tests/regression/wordpress-rule-exclusions-plugin/9507100.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | meta: 3 | author: "Esad Cetiner" 4 | description: "Wordpress Rule Exclusions Plugin" 5 | enabled: true 6 | name: 9507100.yaml 7 | tests: 8 | - test_title: 9507100-1 9 | desc: Disable OWASP CRS for password and 932236 for ARGS_NAMES:pwd 10 | stages: 11 | - stage: 12 | input: 13 | dest_addr: 127.0.0.1 14 | headers: 15 | Host: localhost 16 | User-Agent: OWASP CRS test agent 17 | Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 18 | port: 80 19 | method: POST 20 | version: "HTTP/1.1" 21 | uri: /post/wp-login.php?pwd=