BetterShield
Appearance
Sign-inHardeningPasswords

WordPress breached password check: what leaves your site

· · 9 min read

Updated by Nazmul Hasan Rupok on

A password can be long, mixed and unusual and still be on a list of passwords published after a breach. Length rules cannot see that. A breached password check can, by comparing a new password with those published lists as it is chosen.

The obvious worry is sending passwords somewhere. BetterShield’s check never does. This guide explains how the WordPress breached password check works, what leaves your site and what does not, which passwords it checks, and what happens to the passwords people already use.

Quick summary

  • Leaked password check is a fix under Signing in on BetterShield › Protection › Login & Access. It is off until you turn it on.
  • It asks Have I Been Pwned’s Pwned Passwords service. Only the first five characters of a one-way hash leave your site, and the comparison happens on your server.
  • It checks a password when someone signed in chooses one: on a profile, a store’s account page, or through the REST API.
  • Passwords already in use are never refused, reset or reported, and signing in is never affected.
  • If the service cannot be reached, the password is allowed and the activity log says the check did not run.

What a WordPress breached password check does

BetterShield’s own description puts it plainly: “A password can be long, mixed and unique-looking and still be on a published list.” A password that has been published is one that can be tried anywhere, whatever its length.

So the check asks one question about a new password: has this exact password appeared in a published breach? If it has, the form refuses it with one sentence: “This password appears in a published breach. Choose a different one.” If it has not, the check says nothing at all.

It works alongside BetterShield’s password policy under Settings › General, which sets minimum lengths and refuses passwords built from the username, the site name or very common words. The policy runs first, so a password it refuses never causes a request to leave the site. See General settings.

How the check works: what leaves your site and what does not

Pwned Passwords is a service by Have I Been Pwned that lets a site check a password against published breaches without sending it. Here is the exchange, step by step.

  1. On your server, the new password is turned into a one-way SHA-1 hash: a fixed string of letters and numbers made from it.
  2. Five characters leave the site. Only the first five characters of that hash are sent to api.pwnedpasswords.com.
  3. Many answers come back. The service returns every published hash that starts with those five characters, a set of candidate suffixes. BetterShield asks for response padding, which adds dummy records to make response length less revealing. It is not a fixed-size response or a guarantee that metadata reveals nothing.
  4. The comparison happens on your server. BetterShield looks for the rest of the hash in that list. A match means the password has been published.

The lookup does not intentionally send the password, account name, email address or site URL. It sends the five-character hash prefix and a client identifier. Like any HTTPS service, the recipient also sees normal connection metadata, including the connecting server or proxy address.

This lookup does not retain the submitted password or its full lookup hash. WordPress still stores the account password using its normal password-storage mechanism. BetterShield keeps the service’s public answer for five minutes, so fixing a typo on the same form does not ask again, and even that is filed under a key derived from the five characters rather than the characters themselves.

A person waits on the form while this runs, so the request gives up after five seconds. If the service does not answer, the password is allowed. The log records “Password list check could not be made”, at most once an hour, so a quiet log never passes for a clean one. What BetterShield contacts lists this service with the others.

Password range lookup

The comparison stays on your server

Follow a supported password change through the optional lookup.

  1. Hash locally

    The full password stays local.

  2. Request a range

    Send the first five hash characters.

  3. Compare locally

    Match, no match or unavailable.

Hash locally

What this means
The server derives the hash used for the range lookup. This protocol use of SHA-1 is separate from how WordPress stores account passwords.
Your next check
Do not log, copy or submit a real password to an external test tool.

Request a range

What this means
The service returns matching suffixes plus padding. It receives a prefix and normal connection metadata, not the account password or email.
Your next check
Treat this as a privacy-conscious lookup, not an anonymous connection.

Compare locally

What this means
A match refuses the choice. No match and an unavailable service both allow it, but an outage is recorded.
Your next check
An accepted password is not proof that it was checked or that it has never been exposed.
The breach service covers its known dataset. Keep a unique password and two-factor even when no match is found.

Which passwords it checks

The check runs only when someone signed in chooses a password:

  • The profile screen: changing your own password, or an administrator setting one for another account or a new one.
  • A store’s account page, where customers change their password.
  • The REST API: an account created or changed through WordPress’s users route or a store’s customers route.
  • A password reset completed by someone who is signed in.

It does not check:

  • Public registration or reset forms filled in by a signed-out visitor. In the fix’s words, “A visitor’s registration or reset form never waits on an outside service.”
  • The store checkout.
  • WP-CLI and importers, so a setup script never waits on an outside service.
  • Application passwords, which WordPress generates itself.

What happens to passwords already in use

Nothing. The fix is clear about it: it “Never affects signing in, and never refuses, resets or reports a password an account already has.”

That is deliberate. Checking a password someone already has would mean checking it as they sign in, and nobody should be kept out of their own account by a list. Instead, the check applies the next time each person chooses a password.

If you want existing passwords replaced sooner, ask people to change them. BetterShield’s password policy also flags accounts that signed in with a password below the current policy, as the finding Some people still use passwords weaker than your password rules, without forcing a reset. See Score and findings.

How to turn on the breached password check

  1. Open BetterShield › Protection › Login & Access and find Leaked password check under Signing in.
  2. Press Preview the change to read what it will do. Nothing changes.
  3. Turn the switch on. Because it sits with the sign-in fixes, BetterShield first checks that your recovery link or printed recovery codes work, and were checked within the last day; see Locked out if that check asks you to.

Once it is on, the row reads: “Checked when somebody signed in sets or changes a password. Signing in is never affected.” If another plugin already checks passwords on the same forms, the row says so before you apply it. To stop the check, turn the switch off; nothing else changes. wp bettershield harden breached_passwords --dry-run previews it from the terminal (WP-CLI commands).

What the activity log shows

Two rows belong to this check:

  • “Password refused: it appears in a published breach”, rated Low, naming the account that was choosing it. Not the password, not its hash, and not how many times it has been published.
  • “Password list check could not be made”, at most once an hour, when the service could not be reached.

Read both together. Several refusals for one account suggest its owner keeps reaching for passwords from published lists, which is worth a friendly word. A run of “could not be made” means at least some lookups failed. Because the log is rate-limited, it cannot tell you exactly how many passwords went through unchecked. See Activity log.

Read an accepted password correctly

There are three possible outcomes: a known match, no match in the service’s dataset, or no completed lookup. Only the first refuses the new password. The other two permit it, so a successful save is not evidence that the service answered.

Keep this distinction in your support process:

  • A refusal means choose a different, unique password. It does not prove this WordPress account or site was the source of a breach.
  • No match means the service did not return that password in its known list. It cannot promise the password has never been exposed or reused.
  • Could not be made means the lookup was unavailable. Check outbound connectivity and the service status; do not describe the password as having passed a breach check.

Worked example (fictional): an administrator enables the setting, then tests a signed-out password-reset form and sees no lookup. That follows the feature’s documented coverage. A better coverage test uses a disposable account’s supported signed-in profile on staging, while watching for the refusal or outage event. Keep the local password policy enabled, and never test by copying a real user’s password into another website or a support conversation.

The SHA-1 hash used for this range protocol is not the password-storage format to copy into an application. WordPress manages account password storage separately; this feature uses the hash only to query a known-password range.

Common mistakes

  • Expecting it to check existing passwords. It checks new ones only. Ask people to change theirs if you want them checked.
  • Expecting it on a public sign-up form. Signed-out visitors are not checked, so nobody waits on an outside service from a public page.
  • Reading a quiet log as all clear. If “Password list check could not be made” appears, the check was not answering for that hour.
  • Turning off the password policy. The policy runs first and costs no outside request. Keep both.

Frequently asked questions

Does the breached password check send my password anywhere?

No. The password is hashed on your server and only the first five characters of the hash are sent. The comparison with the published list happens on your server.

Is Pwned Passwords the same as Have I Been Pwned?

Pwned Passwords is a service run by Have I Been Pwned. BetterShield uses only its password range service, and sends it no email address or account name.

Will it lock anyone out of WordPress?

No. It never touches signing in. It only refuses a new password as it is chosen, and allows the password whenever the service cannot be reached.

Does it slow down my site?

Visitors never wait on it. It runs only when a signed-in person sets a password and waits at most five seconds. If the service does not answer, BetterShield waits a minute before asking it again.

Conclusion

A WordPress breached password check closes a gap length rules cannot see, and done this way it never sends a password or touches signing in. Turn on Leaked password check, keep the password policy beside it, and let each password be checked the next time it changes.

BetterShield is free on WordPress.org. Refuse breached passwords covers this fix step by step.

Close the open doors today

Install the free plugin. The first audit runs when you activate it, and all but one of the fixes wait for your choice.

Requires WordPress 6.7 or newer and PHP 8.0 or newer.

Get BetterShield