Cyber Risks · PortSwigger Research

Lab: SQL injection with filter bypass via XML encoding

Summary: PortSwigger's lab presents a stock check feature that passes productId and storeId to the application in XML format, where the storeId is evaluated in a SQL query whose results return in the response. A web application firewall blocks obvious SQL injection payloads, but encoding the payload with XML entities via the Hackvertor extension bypasses the filter, allowing a UNION attack to concatenate and retrieve usernames and passwords from the users table.

What's compelling: The WAF here failed against a payload that was merely re-encoded as XML entities, so a filter tuned to catch obvious injection signatures offers no protection once an attacker changes representation rather than intent.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related