PHPackages                             crumbls/common-passwords - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. crumbls/common-passwords

AbandonedArchivedLibrary[Validation &amp; Sanitization](/categories/validation)

crumbls/common-passwords
========================

A laravel validation rule to exclude not allow the most common 10,000 passwords and any that you add in.

v1.1.1(4y ago)35PHP

Since Aug 30Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Crumbls/common-passwords)[ Packagist](https://packagist.org/packages/crumbls/common-passwords)[ RSS](/packages/crumbls-common-passwords/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (1)Dependencies (1)Versions (3)Used By (0)

common-passwords
================

[](#common-passwords)

A simple package to validate against common passwords and help keep your application secure.

```
composer require crumbls/common-passwords
```

- php artisan common-passwords:install
- Add the \\Crumbls\\CommonPasswords\\Rules\\NotCommonPassword() rule to your password field.
    - Best practice says that the best place to do this is to put it into your registration and password recovery validators.
- You can add any extra passwords using the \\Crumbls\\CommonPasswords\\Models\\Password model. It only has one field: password

Attached is a simple example that can be ran from anywhere. It will throw a validation exception because we are verifying the password "password" which is a commonly used password.

```
try {
    $validator = \Illuminate\Support\Facades\Validator::make([
        'password' => 'password'
    ], [
        'password' => [
            'required',
            'string',
            'min:1',
            'max:256',
            new \Crumbls\CommonPasswords\Rules\NotCommonPassword()
        ],
    ]);
    print_r($validator->validated());
} catch (\Illuminate\Validation\ValidationException $e) {
    echo $e->getMessage();
}
```

Since authentication and registration are commonly reinvented based on the application, this is an example of how you could do it in a very basic RegistrationController out of Laravel 8.x. This would overwrite your validator method.

```
 /**
     * Get a validator for an incoming registration request.
     *
     * @param  array $data
     * @return \Illuminate\Contracts\Validation\Validator
     */
    protected function validator(array $data)
    {
        return Validator::make($data, [
            'name' => ['required', 'string', 'max:255'],
            'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],
            'password' => ['required', 'string', 'min:8', 'confirmed', new \Crumbls\CommonPasswords\Rules\NotCommonPassword()],
        ]);
    }
```

I've had a people ask if you can use this to directly check if a user's password is on this list. It's a horrible idea because of the resources it consumes and this is just brute force testing. That is why you should verify it when you are setting the password. But, if you need to for some reason, here is a simple sample on how to do it.

```
// Take a random user.  You should be more pointed than this.
$user = \App\Models\User::inRandomOrder()->take(1)->first();
    $passwords = \Crumbls\CommonPasswords\Models\Password::orderBy(
        with(new \Crumbls\CommonPasswords\Models\Password())->getKeyName(),
        'asc'
    )->get();
    foreach($passwords as $password) {
        if (\Hash::check($password->password, $user->password)) {
            printf('User had an invalid password: %s .', $password->password);
            break;
        }
    }
```

The documentation is sparse. If you have any questions, feel free to ask here or on twitter @chasecmiller Remember that this is only designed to be a validation rule.

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1767d ago

Major Versions

0.0.2 → v1.1.12021-08-30

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/3020753?v=4)[Chase C. Miller](/maintainers/chasecmiller)[@chasecmiller](https://github.com/chasecmiller)

---

Top Contributors

[![chasecmiller](https://avatars.githubusercontent.com/u/3020753?v=4)](https://github.com/chasecmiller "chasecmiller (1 commits)")

### Embed Badge

![Health badge](/badges/crumbls-common-passwords/health.svg)

```
[![Health](https://phpackages.com/badges/crumbls-common-passwords/health.svg)](https://phpackages.com/packages/crumbls-common-passwords)
```

###  Alternatives

[backpack/crud

Quickly build admin interfaces using Laravel, Bootstrap and JavaScript.

3.4k3.7M223](/packages/backpack-crud)[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[carsdotcom/laravel-json-schema

Json Schema validation for Laravel projects

1043.3k6](/packages/carsdotcom-laravel-json-schema)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.6k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
