Please enable JavaScript to use CodeHS

Cybersecurity for Students

Why Reusing a Password Is Dangerous

One leaked password can open every account that shares it. Learn what credential stuffing is, how account takeover happens, and the simple habits that stop it.

Cybersecurity ~10 min 3 interactive labs
One leaked password tries every door below
  • PixelQuestgame
  • Westbrook Portalschool
  • Mailbirdemail
  • BeatBoxmusic
  • ShopSpotshop

These apps are made up. The idea is real: when every door uses the same key, losing the key costs you every door.

The Big Idea

Why shouldn't you reuse passwords?

Picture one key that opens your house, your locker, your bike lock, and your school. Now picture someone copying that key. They can walk through every door you own.

A reused password works the same way. If you use one password on many sites, then one leak at one site puts all of them at risk. This is the main reason security experts say "one account, one password." It is also true for password reuse for students: game accounts, school accounts, and social accounts are all targets.

Data breach

When attackers steal a company's stored data. The stolen data often includes email addresses and passwords. Read more about data breaches.

Credential stuffing

An attack where a program tries leaked email and password pairs on other websites, hoping people reused them. "Credentials" just means your login details.

Account takeover

When someone else gets into your account and controls it. They can read your messages, spend your money, or lock you out.

The short version: attackers do not need to guess your password. They get it from a breach, then check which other doors it opens. Using a different password for every account is what stops this.

How It Works

What is credential stuffing?

Credential stuffing does not need any clever hacking of your account. It takes three steps.

  1. A site gets breached

    Attackers break into a website you may have used once, like a forum or an old game. They copy its list of emails and passwords.

  2. The list gets shared

    The stolen list is traded or sold online. Millions of pairs can be in one file. You never see this happen.

  3. A bot tries every pair

    A bot (a program that acts without a person) tries each pair on other popular sites. Wherever the pair works, the attacker is in.

    sam@example.test + Blue!Tiger22
    try on shop site ... logged in

The bot does not care who you are. It checks the pair on a site, and a person only gets hurt if they reused that password. People often do. Many people reuse passwords because remembering dozens of different ones feels hard.

After the bot gets in, the account takeover begins. The attacker may change the password so you cannot get back in, buy things with a saved card, message your friends with scams, or use that account to reach more of your accounts.

Interactive Lab 1

Domino Lab: leak one site, watch the rest

Pick how you set up your passwords. Then press Leak one site. The first site (Fanzone forum) gets breached. See which of your other accounts fall. This is a simulation with made-up sites.

Lab

Domino Lab

Simulation only
1. Choose your password setup. (Do not type a real password anywhere on this page.)

    Pick a setup, then press Leak one site.

    Tip: run all four setups and compare the tally. The only thing that changes is how you made your passwords.

    Interactive Lab 2

    Bot attack speed: why it only takes a few minutes

    A person can type maybe one login every few seconds. A bot can try thousands of logins a minute and never gets bored. It also does not need to be lucky often. If a list holds a million pairs, even a small share of working logins means thousands of hijacked accounts.

    Below, a made-up bot tries 1,000 leaked pairs on a made-up shop. Slide to change how many people reused their password, then start the bot.

    Lab

    Bot Attack Speed

    Simulated. No real site.
    0logins tried
    0tries per second
    0tries per minute at this speed

    Shop where many people reuse passwords

    Tried
    0
    Opened
    0

    Shop where everyone uses unique passwords

    Tried
    0
    Opened
    0

    Press Start the bot to run the simulation.

    The numbers are made up for the demo. The bot here runs 300 tries a second so you do not wait long. Real bots often spread tries over many computers, so they can go even faster. Real attacks usually work on a small share of tries, so the share here is a teaching example, not a statistic.

    A Common Mix-up

    A strong password that is reused is still weak

    You may have learned to add capital letters, numbers, and symbols. That helps against guessing. Our password strength tutorial explains how. But credential stuffing is not guessing. The attacker already has the exact password, copied from the breach, so how hard it was to guess no longer matters.

    Strong but reused

    T!ger-Blue-Lamp-2024

    Long and hard to guess. But it sits on 8 sites. One breach exposes the real thing, and the bot types it perfectly.

    Strong and unique

    One password per site

    A breach exposes only that one site. The stolen password is useless anywhere else.

    What about Pass1, Pass2, Pass3?

    Small changes feel clever, but they are not safe. Attackers know the common tricks: add a number, add the site's name, change a letter to a symbol. Many people choose the same few tricks, so bots try those variations too. A pattern might hold up some of the time, but you cannot count on it. If an attacker sees one password, a human or a program can often work out the pattern.

    Good rule: every account needs its own password that has nothing to do with the others. Both strong and unique.

    Defenses

    How to protect yourself from credential stuffing

    You do not need to be an expert. These habits stop most account takeover attempts.

    1. A unique password for every account

    If one site leaks, only that site is affected. This one habit breaks credential stuffing.

    Nobody can memorize dozens of random passwords, so use a password manager. What is a password manager?

    2. Two-step login

    Also called two-factor authentication (2FA). After your password, the site asks for something else, such as a code from an app. A stolen password alone is not enough. What is two-factor authentication?

    3. Passkeys, where a site offers them

    A passkey lets you log in with your fingerprint, face, or device screen lock instead of typing a password. Each site gets its own secret, so there is nothing to reuse and nothing for a breach to leak that works elsewhere.

    4. Use a breach-notification service

    Free services such as haveibeenpwned.com let a person check whether an email address appeared in a known breach, and some can email you when it does. With a trusted adult, look at the site's own explanation first. You should never need to type a password into a breach checker.

    5. Turn on login alerts

    Many accounts can send you a message when someone logs in from a new device or place. If it was not you, change your password right away.

    6. Treat your email like a vault

    Give your email the strongest protection you have. The next section explains why.

    How a password manager helps You remember one long passphrase. It unlocks a password manager vault. The vault fills in a different random password for each of three sites: a game, a school portal, and email. You remember 1 thing one long passphrase Password manager locked vault Game k9#Vq2!mTz8w School portal Rn4$xW7pLe1u Email Zb8&Hy3cQd5s different and random each time
    You remember one strong passphrase. The manager remembers (and fills in) a different random password for every site. The passwords shown are made-up examples.

    Tip: make a passphrase for the one you must remember

    A passphrase is a few random words strung together. It is long, so it is hard to guess, and easier for you to remember than symbols.

    Pick the words truly at random (for example, with dice or a manager's generator). A quote or lyric is not random, and attackers try those first. Use your passphrase for the manager only, and keep it private.

    Short and trickyP@ssw0rd!
    Four random words (example only)river-lamp-tiger-crumb
    Do not use this example. Make your own.

    Learn more in how password strength works. There is also a separate page, How Strong Is Your Password?, about how long a password takes to guess.

    Big Picture

    Your email account is the master key

    Email as a master key Email sits in the center. Arrows show that password reset links for a game, school, shop, and social account all go to the email inbox. EMAIL Game School Shop Social "Forgot password" links go to email

    When you press "Forgot password" on almost any site, it emails you a reset link. So whoever controls your email can reset the password on your other accounts too.

    That makes email the most valuable account you have. Protect it first:

    1. Give it a password that no other account uses.
    2. Turn on two-step login.
    3. Check that the recovery email and phone number are really yours.

    Using one password for your email and other sites is the riskiest reuse of all.

    Interactive Lab 3

    Breach response: put the steps in order

    A site you use sends an email: "We had a data breach. Your password may have been stolen." You reused that password on a few other accounts. What do you do, and in what order?

    Use the arrow buttons to move each step. Then press Check my order.

    Game

    Breach Response Checklist

    Keyboard tip: Tab to the arrow buttons, then press Enter or Space to move a step. Focus stays on the step you move.

      Move the steps into the order you would do them.

      Telling a trusted adult can happen at any time, and sooner is better. It sits at the end here only so the list has one answer.

      Check Yourself

      Quick quiz

      1. What is credential stuffing?

      2. Maya has one long, complex password and uses it on 8 sites. One site is breached. What is true?

      3. A game you used tells you it was breached. You used that same password for your email. What should you do first?

      Keep learning about cybersecurity

      Next, learn what happens inside a breach, how password managers store your secrets, or how a second step blocks a stolen password. Ready to build real skills? Try a full CodeHS cybersecurity course.

      Part of the CodeHS cybersecurity tutorials. All sites, accounts, and passwords on this page are made up.