Cyber Risks · PortSwigger Research

Lab: SQL injection UNION attack, finding a column containing text

Summary: This PortSwigger lab presents a SQL injection vulnerability in a product category filter, where query results are returned in the application's response and can be exploited with a UNION attack to retrieve data from other tables. The lab requires determining the number of columns returned by the query, verifying it returns three columns, and identifying a column compatible with string data by making a random value provided by the lab appear in the results.

Bottom line: A category filter that returns query results directly in the response is enough for an attacker to enumerate column counts and pull data from other tables, so any input reaching a SQL query without proper parameterization carries that exposure.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related