Cyber Risks · PortSwigger Research

DOM-based client-side SQL injection

Summary: PortSwigger describes DOM-based client-side SQL injection, where a script places attacker-controllable data into a client-side SQL query unsafely, letting an attacker build a URL that runs an arbitrary SQL query in the visitor's local browser database. The impact depends on what that database holds: sensitive data such as social network messages could be retrieved, and pending actions such as outgoing email could be modified and performed on the user's behalf.

Why it matters: The vulnerable function is the JavaScript executeSql() API, and PortSwigger's fix is to parameterize every variable data item in a query, even ones not obviously tainted, because a single unparameterized query in browser-side code hands an attacker the user's local database.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related