Skip to content

Commit 7132eb9

Browse files
fzipiCopilot
andauthored
feat: add well known deployment problems (#111)
* feat: add well known deployment problems Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org> * fix: update known issues Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org> * Apply suggestion from @fzipi * fix: reference Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org> --------- Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent 79726d2 commit 7132eb9

1 file changed

Lines changed: 59 additions & 41 deletions

File tree

content/7-known-issues/_index.md

Lines changed: 59 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -9,63 +9,81 @@ aliases: ["../operation/known_issues"]
99

1010
> There are some *known issues* with CRS and some of its compatible WAF engines. This page describes these issues. Get in touch if you think something is missing.
1111
12-
- There are still **false positives** for standard web applications in the default install (paranoia level 1). Please [report these on GitHub](https://github.com/coreruleset/coreruleset/issues/new/choose) if and when encountered.
12+
{{% notice warning %}}
13+
There are still **false positives** for standard web applications in the default install (paranoia level 1). Please [report these on GitHub](https://github.com/coreruleset/coreruleset/issues/new/choose) if and when encountered.
14+
{{% /notice %}}
1315

14-
False positives from paranoia level 2 and higher are considered to be less interesting, as it is expected that users will write exclusion rules for their alerts in the higher paranoia levels. Nevertheless, false positives from higher paranoia levels can still be reported and the CRS project will try to find a generic solution for them.
16+
👉 False positives from paranoia level 2 and higher are considered to be less interesting, as it is expected that users will write exclusion rules for their alerts in the higher paranoia levels. Nevertheless, false positives from higher paranoia levels can still be reported and the CRS project will try to find a generic solution for them.
1517

16-
- **Apache** may give an error on startup when the CRS is loaded:
18+
### AH00111: Config variable ${...} is not defined
1719

18-
```
19-
AH00111: Config variable ${[^} is not defined
20-
```
20+
**Apache** may give an error on startup when the CRS is loaded:
2121

22-
It appears that Apache tries to be smart by trying to evaluate a config variable. This notice should be a warning and can be safely ignored. The problem has been investigated and a solution has not been found yet.
22+
```
23+
AH00111: Config variable ${[^} is not defined
24+
```
2325

24-
- **ModSecurity 3.0.0-3.0.2** will give an error:
26+
It appears that Apache tries to be smart by trying to evaluate a config variable. This notice should be a warning and can be safely ignored. The problem has been investigated and a solution has not been found yet.
2527

26-
```
27-
Expecting an action, got: ctl:requestBodyProcessor=URLENCODED"`
28-
```
28+
### **ModSecurity 3.0.0-3.0.2** will give an error
2929

30-
Support for the URLENCODED body processor was only added in ModSecurity 3.0.3. To resolve this, upgrade to ModSecurity 3.0.3 or higher.
30+
```
31+
Expecting an action, got: ctl:requestBodyProcessor=URLENCODED"`
32+
```
3133

32-
- **Debian** releases up to and including Jessie lack YAJL/JSON support in ModSecurity. This causes the following error in the Apache ErrorLog or SecAuditLog:
34+
Support for the URLENCODED body processor was only added in ModSecurity 3.0.3. To resolve this, upgrade to ModSecurity 3.0.3 or higher.
3335

34-
```
35-
ModSecurity: JSON support was not enabled.
36-
```
36+
### Old Debian versions without YAJL
3737

38-
JSON support was enabled in Debian's package version 2.8.0-4 (Nov 2014). To resolve this, it is possible to either use `backports.debian.org` to install the latest ModSecurity
39-
release or to disable the rule with ID 200001.
38+
**Debian** releases up to and including Jessie lack YAJL/JSON support in ModSecurity. This causes the following error in the Apache ErrorLog or SecAuditLog:
4039

41-
- **Apache 2.4 prior to 2.4.11** is affected by a bug in parsing multi-line configuration directives, which causes Apache to fail during startup with an error such as:
40+
```
41+
ModSecurity: JSON support was not enabled.
42+
```
4243

43-
```plaintext
44-
Error parsing actions: Unknown action: \\
45-
Action 'configtest' failed.`
46-
```
44+
JSON support was enabled in Debian's package version 2.8.0-4 (Nov 2014). To resolve this, it is possible to either use `backports.debian.org` to install the latest ModSecurity
45+
release or to disable the rule with ID 200001.
4746

48-
{{% notice style="note" icon="code" %}}
49-
application/soap+xml is indicative that XML will be provided. In accordance with this, ModSecurity's XML request body processor should also be configured to support this MIME type. Within the ModSecurity project, [commit 5e4e2af](https://github.com/owasp-modsecurity/ModSecurity/commit/5e4e2af7a6f07854fee6ed36ef4a381d4e03960e) has been merged to support this endeavor. However, if running a modified or preexisting version of the modsecurity.conf file provided by this repository, it is a good idea to upgrade rule '200000' accordingly. The rule now appears as follows:
47+
### Apache 2.4 prior to 2.4.11
5048

51-
```
52-
SecRule REQUEST_HEADERS:Content-Type "(?:application(?:/soap\+|/)|text/)xml" \
53-
"id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML"
54-
```
55-
{{% /notice %}}
49+
Apache versions prior to 2.4.11 are affected by a bug in parsing multi-line configuration directives, which causes Apache to fail during startup with an error such as:
50+
51+
```plaintext
52+
Error parsing actions: Unknown action: \\
53+
Action 'configtest' failed.`
54+
```
55+
56+
This bug is known to plague RHEL/Centos 7 below v7.4 or httpd v2.4.6 release 67 and Ubuntu 14.04 LTS users. (The original bug report can be found at <https://bz.apache.org/bugzilla/show_bug.cgi?id=55910\>).
57+
58+
By now you should not be using such an old web server. It is advisable to upgrade your Apache version. If upgrading is not possible, the CRS project provides a script in the `util/join-multiline-rules` directory which converts the rules into a format that works around the bug. This script must be re-run whenever the CRS rules are modified or updated.
59+
60+
### Support for `application/soap+xml`
5661

57-
- **All versions of libmodsecurity3** [do not support](https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-(v3.x)#secdisablebackendcompression) the `SecDisableBackendCompression` directive at all.
62+
As of CRS version 3.0.1, support has been added for the `application/soap+xml` MIME type by default, as specified in RFC 3902. **OF IMPORTANCE:** application/soap+xml is indicative that XML will be provided. In accordance with this, ModSecurity's XML request body processor should also be configured to support this MIME type. Within the ModSecurity project, [commit 5e4e2af](https://github.com/owasp-modsecurity/ModSecurity/commit/5e4e2af7a6f07854fee6ed36ef4a381d4e03960e) has been merged to support this endeavor. However, if running a modified or preexisting version of the modsecurity.conf file provided by this repository, it is a good idea to upgrade rule '200000' accordingly. The rule now appears as follows:
63+
64+
```
65+
SecRule REQUEST_HEADERS:Content-Type "(?:application(?:/soap\+|/)|text/)xml" \
66+
"id:'200000',phase:1,t:none,t:lowercase,pass,nolog,ctl:requestBodyProcessor=XML"
67+
```
68+
69+
### `SecDisableBackendCompression` not supported in libmodsecurity3
70+
71+
All versions of libmodsecurity3 [do not support](https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-(v3.x)#secdisablebackendcompression) the `SecDisableBackendCompression` directive at all.
5872
If Nginx is acting as a proxy and the backend supports any type of compression, if the client sends an `Accept-Encoding: gzip,deflate,...` or `TE` header, the backend will return the response in a compressed format. Because of this, the engine cannot verify the response. As a workaround, you need to override the `Accept-Encoding` and `TE` headers in the proxy:
5973

60-
```
61-
server {
62-
server_name foo.com;
74+
```nginx
75+
server {
76+
server_name foo.com;
77+
...
78+
location / {
79+
proxy_pass http://backend;
6380
...
64-
location / {
65-
proxy_pass http://backend;
66-
...
67-
proxy_set_header Accept-Encoding "";
68-
proxy_set_header TE "";
69-
}
81+
proxy_set_header Accept-Encoding "";
82+
proxy_set_header TE "";
7083
}
71-
```
84+
}
85+
```
86+
87+
### Webserver returns error after CRS install
88+
89+
This is likley due to a rule triggering. For instance in some cases a rule is enabled that prohibits access via an IP address. Depending on your [SecDefaultAction](<https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-(v2.x)#SecDefaultAction>) and [SecRuleEngine](<https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-(v2.x)#SecRuleEngine>) configurations, this may result in a redirect loop or a status code. If this is the problem you are experiencing you should consult your error.log (or event viewer for IIS). From this location you candetermine the offending rule and add an exception if neccessary see [false positives and tuning]({{< ref "2-3-false-positives-and-tuning.md" >}}).

0 commit comments

Comments
 (0)