Managed Rules
Cloudflare provides pre-configured managed rulesets that protect against web application exploits such as the following:
- Zero-day vulnerabilities
- Top-10 attack techniques
- Use of stolen/leaked credentials
- Extraction of sensitive data
Managed rulesets are regularly updated. Each rule has a default action that varies according to the severity of the rule. You can adjust the behavior of specific rules, choosing from several possible actions.
Rules of managed rulesets have associated tags (such as wordpress) that allow you to search for a specific group of rules and configure them in bulk.
-
Cloudflare Managed Ruleset: Created by the Cloudflare security team, this ruleset provides fast and effective protection for all of your applications. It covers known attack techniques and zero-day vulnerabilities (newly discovered flaws with no available patch). The ruleset is updated frequently to address new threats and reduce false positives (legitimate requests incorrectly flagged).
Ruleset ID: -
Cloudflare OWASP Core Ruleset: Cloudflare's implementation of the Open Web Application Security Project (OWASP) ModSecurity Core Rule Set. This ruleset uses a scoring model — each matching rule adds its score to a cumulative threat score, and the WAF executes the configured action when the score exceeds the threshold.
Ruleset ID: -
Cloudflare Exposed Credentials Check: Deploys an automated credentials check on your end-user authentication endpoints. For any credential pair, the Cloudflare WAF performs a lookup against a public database of stolen credentials to determine if they were previously compromised. Cloudflare recommends that you use leaked credentials detection instead of this ruleset.
Ruleset ID: -
Cloudflare Free Managed Ruleset: Available on all Cloudflare plans. Provides protection against high-impact and widely exploited vulnerabilities. The rules are safe to deploy on most applications. If you have already deployed the Cloudflare Managed Ruleset, you do not need this ruleset — the Cloudflare Managed Ruleset includes broader coverage.
Ruleset ID:
The following managed rulesets run in a response phase:
- Cloudflare Sensitive Data Detection: Created by Cloudflare to address common data loss threats. These rules monitor the download of specific sensitive data — for example, financial and personally identifiable information.
Ruleset ID:
The managed rulesets you can deploy depend on your Cloudflare plan.
| Free | Pro | Business | Enterprise | |
|---|---|---|---|---|
Availability | Yes | Yes | Yes | Yes |
Free Managed Ruleset | Yes | Yes | Yes | Yes |
Cloudflare Managed Ruleset | No | Yes | Yes | Yes |
Cloudflare OWASP Core Ruleset | No | Yes | Yes | Yes |
Cloudflare Exposed Credentials Check (deprecated) | No | Yes | Yes | Yes |
Cloudflare Sensitive Data Detection | No | No | No | Yes |
To customize the behavior of managed rulesets, do one of the following:
- Create exceptions to skip the execution of managed rulesets or some of their rules under certain conditions.
- Configure overrides to change the rule action or disable one or more rules of managed rulesets. Overrides can affect an entire managed ruleset, specific tags, or specific rules in the managed ruleset.
Exceptions have priority over overrides.
If you are using several app security features like custom rules, Managed Rules, and Super Bot Fight Mode, it is important to understand how these features interact and the order in which they execute. Refer to Security features interoperability for more information.
Managed rules inspect the body of each incoming request up to a maximum size. This limit varies by plan:
- For Enterprise customers, the maximum body size is 128 KB.
- For other paid plans, the limit is lower by default — contact your account team or Cloudflare Support to increase the limit.
- For users in the Free plan, the limit is 1 MB.
Request content beyond this limit may not be fully analyzed, which can affect how managed rules behave. For example, the OWASP Core Ruleset calculates a cumulative threat score based on the scores of individual rules that match a request. Larger payloads give more content for rules to match against, which increases the score and makes it more likely to exceed the score threshold — resulting in a false positive.
If included in your plan, you can use request body fields in custom rules to apply appropriate actions to requests that have not been fully analyzed. The http.request.body.truncated field indicates whether the request body was truncated, while http.request.headers.truncated indicates whether the request contained too many headers for all of them to be included.
At the zone level, you can deploy each managed ruleset once. At the account level, you can deploy each managed ruleset multiple times, which allows you to apply different configurations of the same ruleset to different subsets of incoming traffic.