How exposed credentials checks work
Last updated Apr 16, 2026 Deprecation notice
Exposed credentials check has been deprecated.
Switch from exposed credentials check to leaked credentials detection for improved security. To upgrade your current configuration, refer to the upgrade guide.
WAF rules can include a check for exposed credentials. When enabled in a given rule, exposed credentials checking happens when there is a match for the rule expression (that is, the rule expression evaluates to true).
At this point, the WAF looks up the username/password pair in the request against a database of publicly available stolen credentials. When both the rule expression and the exposed credentials check are true, there is a rule match, and Cloudflare performs the action configured in the rule.
Example
For example, the following rule matches POST requests to the /login.php URI when Cloudflare identifies the submitted credentials as previously exposed:
Rule #1
Rule expression:
http.request.method == "POST" and http.request.uri == "/login.php"
Exposed credentials check with the following configuration:
- Username expression:
http.request.body.form["user_id"] - Password expression:
http.request.body.form["password"]
Action: Interactive Challenge
When there is a match for the rule above and Cloudflare detects exposed credentials, the WAF presents the user with a challenge.
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/waf/managed-rules/check-for-exposed-credentials/how-checks-work/#page","headline":"How exposed credentials checks work","description":"How exposed credentials checks detect compromised login attempts.","url":"https://developers.cloudflare.com/waf/managed-rules/check-for-exposed-credentials/how-checks-work/","inLanguage":"en","image":"https://developers.cloudflare.com/waf/managed-rules/check-for-exposed-credentials/how-checks-work/og.png?v=67b8f7a36c50cbd6","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Monitor exposed credentials events in Security Events. title: Monitor exposed credentials events image: https://developers.cloudflare.com/waf/managed-rules/check-for-exposed-credentials/monitor-events/og.png?v=447c696192320515
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/waf/llms.txt
Use this file to discover all available pages before exploring further.
Docs