⚠️SQLi warning

Using OR 1=1 in SQL injections is risky and should rarely be used in real-world engagements. It loads all rows of the table, which may not bypass the login if only one row is expected. This can also cause database performance issues.

As an alternative, consider using AND 1=1 with a valid input (such as a legitimate username) to test or confirm SQL injection vulnerabilities.

Example:

  1. Detect a potential Error message after a failed login (doesn’t respect OWASP Guidelines).

  2. Using the error to brute force the username field with Hydra

  3. Get a legitimate username

  4. Do a SQLi like: user' AND '1'='1'-- -

  5. Bingo!!

Last updated