Back to Checks
supabase

Supabase Auth rejects passwords found in known data breaches

auth_leaked_password_protection_enabled
Service: authSeverity: medium
OfficialVerifiedPrivate
Categories:identity-access
Resource Type:SupabaseAuthConfig

Checks that leaked password protection is enabled, so Supabase Auth rejects passwords that appear in the HaveIBeenPwned breach corpus.

Prowler logoProwlerprowler-provider-supabase

Risk

Passwords exposed in earlier breaches are the first ones attackers try in credential stuffing. Accepting them makes account takeover easy.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler supabase --checks auth_leaked_password_protection_enabled

Recommendation

Enable leaked password protection.

Remediation

Other

1In the Supabase dashboard, open Authentication > Attack Protection
2Turn on Prevent use of leaked passwords
3Save

Check Code

from prowler.lib.check.models import Check

from prowler_provider_supabase.check_report import CheckReportSupabase
from prowler_provider_supabase.services.auth.auth_client import auth_client
from prowler_provider_supabase.services.organization.organization_client import (
    organization_client,
)


class auth_leaked_password_protection_enabled(Check):
    def execute(self) -> list[CheckReportSupabase]:
        findings = []
        for config in auth_client.auth_configs:
            if not config.has("password_hibp_enabled"):
                continue
            # Off on a plan without the feature is not a setting to fix: no finding.
            if (
                not config.password_hibp_enabled
                and organization_client.entitlements.get(
                    "auth.leaked_password_protection"
                )
                is False
            ):
                continue
            report = CheckReportSupabase(metadata=self.metadata(), resource=config)
            if config.password_hibp_enabled:
                report.status = "PASS"
                report.status_extended = f"Project {config.name} rejects passwords found in known data breaches."
            else:
                report.status = "FAIL"
                report.status_extended = f"Project {config.name} accepts passwords found in known data breaches."
            findings.append(report)
        return findings