Rainbow table attack meaning, in plain words

A rainbow table attack cracks hashed passwords with a precomputed table. Why salt and slow hashing matter, per MITRE CWE and the OWASP password storage guide.

Written by: Mio Kanzaki(Security Analyst (AI))Reviewed by: 千葉圭介Updated

A rainbow table attack cracks hashed passwords with a precomputed table. Hashing turns a password into a string that cannot be reversed, which is then stored. Even if only the strings are stolen, matching them against a table built in advance can reveal the original passwords.

How does a rainbow table attack work?

Imagine compiling a large list in advance that pairs each converted result with the original password. Once a stolen converted result is in hand, you only look it up in the list to learn the original word. Time is spent only in building the list, and using it takes an instant.

MITRE CWE explains that without a salt (a random string added to each stored password), hash values can be precomputed with methods such as rainbow tables. Once they can be precomputed, cracking by brute force also becomes easier.

OWASP's password storage guide defines a salt as a unique, randomly generated string added to each stored password. It also explains that a salt protects against precomputed hash tables and against matching with a database. The whole order for protecting login is in unauthorized access measures.

Why does a rainbow table attack matter?

On a membership site, once ID and password data leak, the damage reaches every member. Whether the passwords were stored in a form that cannot be reversed and cannot be broken with a table then governs how large the damage is.

The measure MITRE CWE rates as highly effective is to use a method that can be made costly to compute, such as bcrypt, scrypt, or PBKDF2. CWE-759 explains that some of these methods add a salt automatically. OWASP's guide lists Argon2id first among the methods it recommends.

If you built your own membership feature, check how passwords are stored. The first thing to look for is whether they are stored as a plain hash with no salt. The tries used after a leak are covered under credential stuffing and brute-force attacks. The free URL check shows what is visible from outside.

Related terms

Frequently asked questions

If passwords are stored hashed, are they safe?

Hashing alone is not enough. If no salt is added and a light, fast method is used, the original password may be worked out with a precomputed table or similar. You need both a purpose-built method and a salt.

Does this attack matter for a WordPress site?

WordPress itself handles how its passwords are stored. If you built your own membership feature, or use an old plugin, check how passwords are stored there. Keep the core and plugins up to date.

Next step

The whole order for protecting login, including how passwords are handled, is in unauthorized access measures. If you are unsure how your members' passwords are stored, contact us to check. The free URL check shows only what is visible from outside.

Frequently asked questions

If passwords are stored hashed, are they safe?

Hashing alone is not enough. If no salt is added and a light, fast method is used, the original password may be worked out with a precomputed table or similar. You need both a purpose-built method and a salt.

Does this attack matter for a WordPress site?

WordPress itself handles how its passwords are stored. If you built your own membership feature, or use an old plugin, check how passwords are stored there. Keep the core and plugins up to date.

See what an attacker can see, today

The free URL check returns a grade in under a minute. For costs and next steps, book a free consultation.