Lab: SQL injection attack, querying the database type and version on Oracle
Summary: PortSwigger's lab presents a SQL injection vulnerability in a product category filter that can be exploited with a UNION attack to retrieve results from an injected query. Because Oracle requires every SELECT to name a table, the lab notes that a UNION SELECT must include FROM followed by a valid table such as the built-in dual table, and the goal is to display the database version string.
What you should know: The exercise turns on a single Oracle quirk - every SELECT needs a FROM clause, satisfied by the built-in dual table - which is enough for an attacker to pull the database version string out through a product category filter.
Read the original at PortSwigger Research ↗
- Topics
- Vulnerabilities & Patching
- Related
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026